Merge tag 'perf-tools-2020-12-24' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / drivers / rtc / rtc-brcmstb-waketimer.c
index 4fee57c..0366e2f 100644 (file)
@@ -252,7 +252,7 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev)
        timer->rtc->ops = &brcmstb_waketmr_ops;
        timer->rtc->range_max = U32_MAX;
 
-       ret = rtc_register_device(timer->rtc);
+       ret = devm_rtc_register_device(timer->rtc);
        if (ret)
                goto err_notifier;
 
@@ -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;
 }