diff --git a/drivers/rtc/rtc-ftrtc010.c b/drivers/rtc/rtc-ftrtc010.c index 98fa0f518303..512790bc3f2b 100644 --- a/drivers/rtc/rtc-ftrtc010.c +++ b/drivers/rtc/rtc-ftrtc010.c @@ -180,7 +180,11 @@ static int ftrtc010_rtc_probe(struct platform_device *pdev) if (unlikely(ret)) goto err_disable_extclk; - return devm_rtc_register_device(rtc_dev); + ret = devm_rtc_register_device(rtc_dev); + if (ret) + goto err_disable_extclk; + + return 0; err_disable_extclk: clk_disable_unprepare(rtc->extclk);