summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorXu Wang <vulab@iscas.ac.cn>2020-11-13 08:45:38 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2020-11-14 23:52:09 +0100
commit910d002d84df21da61cadba92dd510ece5e46312 (patch)
treeb2ee7f2208c9cf438a4e901388a743abf8e5b3bf /drivers/rtc
parentrtc: pl031: fix resource leak in pl031_probe (diff)
downloadlinux-910d002d84df21da61cadba92dd510ece5e46312.tar.xz
linux-910d002d84df21da61cadba92dd510ece5e46312.zip
rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare
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
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-brcmstb-waketimer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-brcmstb-waketimer.c b/drivers/rtc/rtc-brcmstb-waketimer.c
index 4fee57c51280..375a9987a1d6 100644
--- a/drivers/rtc/rtc-brcmstb-waketimer.c
+++ b/drivers/rtc/rtc-brcmstb-waketimer.c
@@ -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;
}