Commit 9510853cfde2223ef39b4a7fbbb7fb100d780661

Authored by Jingoo Han
Committed by Linus Torvalds
1 parent ee4433573b

rtc: rtc-imxdi: use devm_clk_get()

Use devm_clk_get() to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 3 deletions Side-by-side Diff

drivers/rtc/rtc-imxdi.c
... ... @@ -406,7 +406,7 @@
406 406  
407 407 mutex_init(&imxdi->write_mutex);
408 408  
409   - imxdi->clk = clk_get(&pdev->dev, NULL);
  409 + imxdi->clk = devm_clk_get(&pdev->dev, NULL);
410 410 if (IS_ERR(imxdi->clk))
411 411 return PTR_ERR(imxdi->clk);
412 412 clk_prepare_enable(imxdi->clk);
... ... @@ -475,7 +475,6 @@
475 475  
476 476 err:
477 477 clk_disable_unprepare(imxdi->clk);
478   - clk_put(imxdi->clk);
479 478  
480 479 return rc;
481 480 }
... ... @@ -492,7 +491,6 @@
492 491 rtc_device_unregister(imxdi->rtc);
493 492  
494 493 clk_disable_unprepare(imxdi->clk);
495   - clk_put(imxdi->clk);
496 494  
497 495 return 0;
498 496 }