From: Jingoo Han Date: Fri, 22 Feb 2013 00:45:35 +0000 (-0800) Subject: rtc: rtc-imxdi: use devm_clk_get() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9510853cfde2223ef39b4a7fbbb7fb100d780661;p=linux-beck.git rtc: rtc-imxdi: use devm_clk_get() Use devm_clk_get() to make cleanup paths more simple. Signed-off-by: Jingoo Han Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c index 75d307ab37f4..82aad695979e 100644 --- a/drivers/rtc/rtc-imxdi.c +++ b/drivers/rtc/rtc-imxdi.c @@ -406,7 +406,7 @@ static int dryice_rtc_probe(struct platform_device *pdev) mutex_init(&imxdi->write_mutex); - imxdi->clk = clk_get(&pdev->dev, NULL); + imxdi->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(imxdi->clk)) return PTR_ERR(imxdi->clk); clk_prepare_enable(imxdi->clk); @@ -475,7 +475,6 @@ static int dryice_rtc_probe(struct platform_device *pdev) err: clk_disable_unprepare(imxdi->clk); - clk_put(imxdi->clk); return rc; } @@ -492,7 +491,6 @@ static int dryice_rtc_remove(struct platform_device *pdev) rtc_device_unregister(imxdi->rtc); clk_disable_unprepare(imxdi->clk); - clk_put(imxdi->clk); return 0; }