rtc: omap: add missing register lock in error path
authorJohan Hovold <johan@kernel.org>
Wed, 4 Jul 2018 09:05:57 +0000 (11:05 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 12 Jul 2018 18:31:19 +0000 (20:31 +0200)
For completeness re-lock the registers also in the power-off error path.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-omap.c

index 6a7b804..7f9ee55 100644 (file)
@@ -449,6 +449,7 @@ static void omap_rtc_power_off(void)
 
        if (tm2bcd(&tm) < 0) {
                dev_err(&rtc->rtc->dev, "power off failed\n");
+               rtc->type->lock(rtc);
                return;
        }