rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare
authorXu Wang <vulab@iscas.ac.cn>
Fri, 13 Nov 2020 07:45:38 +0000 (07:45 +0000)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sat, 14 Nov 2020 22:52:09 +0000 (23:52 +0100)
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20201113074538.65028-1-vulab@iscas.ac.cn
drivers/rtc/rtc-brcmstb-waketimer.c

index 4fee57c..375a998 100644 (file)
@@ -264,8 +264,7 @@ err_notifier:
        unregister_reboot_notifier(&timer->reboot_notifier);
 
 err_clk:
-       if (timer->clk)
-               clk_disable_unprepare(timer->clk);
+       clk_disable_unprepare(timer->clk);
 
        return ret;
 }