Subject: + rtc-rv3029c2-fix-potential-race-condition.patch added to -mm tree To: gregory.hermant@xxxxxxxxxxxxxxxxx,a.zummo@xxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Tue, 01 Apr 2014 15:48:35 -0700 The patch titled Subject: drivers/rtc/rtc-rv3029c2.c: fix potential race condition has been added to the -mm tree. Its filename is rtc-rv3029c2-fix-potential-race-condition.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/rtc-rv3029c2-fix-potential-race-condition.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/rtc-rv3029c2-fix-potential-race-condition.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Gregory Hermant <gregory.hermant@xxxxxxxxxxxxxxxxx> Subject: drivers/rtc/rtc-rv3029c2.c: fix potential race condition RTC drivers must not return an error after device registration. Signed-off-by: Gregory Hermant <gregory.hermant@xxxxxxxxxxxxxxxxx> Acked-by: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/rtc-rv3029c2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff -puN drivers/rtc/rtc-rv3029c2.c~rtc-rv3029c2-fix-potential-race-condition drivers/rtc/rtc-rv3029c2.c --- a/drivers/rtc/rtc-rv3029c2.c~rtc-rv3029c2-fix-potential-race-condition +++ a/drivers/rtc/rtc-rv3029c2.c @@ -395,6 +395,12 @@ static int rv3029c2_probe(struct i2c_cli if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_EMUL)) return -ENODEV; + rc = rv3029c2_i2c_get_sr(client, buf); + if (rc < 0) { + dev_err(&client->dev, "reading status failed\n"); + return rc; + } + rtc = devm_rtc_device_register(&client->dev, client->name, &rv3029c2_rtc_ops, THIS_MODULE); @@ -403,12 +409,6 @@ static int rv3029c2_probe(struct i2c_cli i2c_set_clientdata(client, rtc); - rc = rv3029c2_i2c_get_sr(client, buf); - if (rc < 0) { - dev_err(&client->dev, "reading status failed\n"); - return rc; - } - return 0; } _ Patches currently in -mm which might be from gregory.hermant@xxxxxxxxxxxxxxxxx are rtc-rv3029c2-fix-potential-race-condition.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html