rtc: cros-ec: remove superfluous error message
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 16 Oct 2019 20:14:13 +0000 (22:14 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 8 Nov 2019 15:14:09 +0000 (16:14 +0100)
The RTC core now has error messages in case of registration failure, there
is no need to have other messages in the drivers.

Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20191016201414.30934-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-cros-ec.c

index 6909e01..da209d0 100644 (file)
@@ -351,11 +351,8 @@ static int cros_ec_rtc_probe(struct platform_device *pdev)
        cros_ec_rtc->rtc = devm_rtc_device_register(&pdev->dev, DRV_NAME,
                                                    &cros_ec_rtc_ops,
                                                    THIS_MODULE);
-       if (IS_ERR(cros_ec_rtc->rtc)) {
-               ret = PTR_ERR(cros_ec_rtc->rtc);
-               dev_err(&pdev->dev, "failed to register rtc device\n");
-               return ret;
-       }
+       if (IS_ERR(cros_ec_rtc->rtc))
+               return PTR_ERR(cros_ec_rtc->rtc);
 
        /* Get RTC events from the EC. */
        cros_ec_rtc->notifier.notifier_call = cros_ec_rtc_event;