Message ID | 20201113074538.65028-1-vulab@iscas.ac.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare | expand |
On 11/12/20 11:45 PM, Xu Wang wrote: > 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> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
On Fri, 13 Nov 2020 07:45:38 +0000, Xu Wang wrote: > Because clk_disable_unprepare() already checked NULL clock parameter, > so the additional check is unnecessary, just remove it. Applied, thanks! [1/1] rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare commit: 910d002d84df21da61cadba92dd510ece5e46312 Best regards,
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 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev) unregister_reboot_notifier(&timer->reboot_notifier); err_clk: - if (timer->clk) - clk_disable_unprepare(timer->clk); + clk_disable_unprepare(timer->clk); return ret; }
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> --- drivers/rtc/rtc-brcmstb-waketimer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)