OSDN Git Service

rtc: at91sam9: remove useless check
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Tue, 28 Jul 2015 19:47:57 +0000 (21:47 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sat, 5 Sep 2015 11:19:08 +0000 (13:19 +0200)
rtc->sclk necessarily points to a valid clocks at this point. Else the
probe would have aborted.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
drivers/rtc/rtc-at91sam9.c

index 152cd81..0a8485a 100644 (file)
@@ -494,8 +494,7 @@ static int at91_rtc_remove(struct platform_device *pdev)
        /* disable all interrupts */
        rtt_writel(rtc, MR, mr & ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN));
 
-       if (!IS_ERR(rtc->sclk))
-               clk_disable_unprepare(rtc->sclk);
+       clk_disable_unprepare(rtc->sclk);
 
        return 0;
 }