kernel/drivers/rtc/rtc-mxc_v2.c
.. .. @@ -337,8 +337,10 @@ 337 337 } 338 338 339 339 pdata->rtc = devm_rtc_allocate_device(&pdev->dev); 340 - if (IS_ERR(pdata->rtc))340 + if (IS_ERR(pdata->rtc)) {341 + clk_disable_unprepare(pdata->clk);341 342 return PTR_ERR(pdata->rtc); 343 + }342 344 343 345 pdata->rtc->ops = &mxc_rtc_ops; 344 346 pdata->rtc->range_max = U32_MAX;