Skip to content

Commit

Permalink
rtc: at91sam9: remove useless check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Belloni committed Sep 5, 2015
1 parent ffe60fc commit 73ab31c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/rtc/rtc-at91sam9.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 73ab31c

Please sign in to comment.