From 4071ea25cc08d41002746cca2d69ac700d67a2ac Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Thu, 3 Apr 2014 14:49:36 -0700 Subject: rtc: fix potential race condition RTC drivers must not return an error after device registration. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Alessandro Zummo Reported-by: Ales Novak Cc: Alexander Shiyan Cc: Atsushi Nemoto Cc: Jiri Kosina Cc: Srikanth Srinivasan Cc: Lee Jones Cc: Sascha Hauer Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/rtc-ds3232.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/rtc/rtc-ds3232.c') diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index b83bb5a527f8..15497c578af5 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -414,7 +414,6 @@ static int ds3232_probe(struct i2c_client *client, ds3232->rtc = devm_rtc_device_register(&client->dev, client->name, &ds3232_rtc_ops, THIS_MODULE); if (IS_ERR(ds3232->rtc)) { - dev_err(&client->dev, "unable to register the class device\n"); return PTR_ERR(ds3232->rtc); } @@ -423,7 +422,6 @@ static int ds3232_probe(struct i2c_client *client, "ds3232", client); if (ret) { dev_err(&client->dev, "unable to request IRQ\n"); - return ret; } } -- cgit v1.2.3