aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds3232.c
diff options
context:
space:
mode:
authorAlessandro Zummo <[email protected]>2014-04-03 21:49:36 +0000
committerLinus Torvalds <[email protected]>2014-04-03 23:21:16 +0000
commit4071ea25cc08d41002746cca2d69ac700d67a2ac (patch)
tree43cf44f8265b885c8c1e4e81f0ced5c6babb53c7 /drivers/rtc/rtc-ds3232.c
parentinit/do_mounts.c: fix comment error (diff)
downloadkernel-4071ea25cc08d41002746cca2d69ac700d67a2ac.tar.gz
kernel-4071ea25cc08d41002746cca2d69ac700d67a2ac.zip
rtc: fix potential race condition
RTC drivers must not return an error after device registration. [[email protected]: coding-style fixes] Signed-off-by: Alessandro Zummo <[email protected]> Reported-by: Ales Novak <[email protected]> Cc: Alexander Shiyan <[email protected]> Cc: Atsushi Nemoto <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Srikanth Srinivasan <[email protected]> Cc: Lee Jones <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Joonsoo Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/rtc/rtc-ds3232.c')
-rw-r--r--drivers/rtc/rtc-ds3232.c2
1 files changed, 0 insertions, 2 deletions
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;
}
}