Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9510853c authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds
Browse files

rtc: rtc-imxdi: use devm_clk_get()



Use devm_clk_get() to make cleanup paths more simple.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ee443357
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -406,7 +406,7 @@ static int dryice_rtc_probe(struct platform_device *pdev)


	mutex_init(&imxdi->write_mutex);
	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))
	if (IS_ERR(imxdi->clk))
		return PTR_ERR(imxdi->clk);
		return PTR_ERR(imxdi->clk);
	clk_prepare_enable(imxdi->clk);
	clk_prepare_enable(imxdi->clk);
@@ -475,7 +475,6 @@ static int dryice_rtc_probe(struct platform_device *pdev)


err:
err:
	clk_disable_unprepare(imxdi->clk);
	clk_disable_unprepare(imxdi->clk);
	clk_put(imxdi->clk);


	return rc;
	return rc;
}
}
@@ -492,7 +491,6 @@ static int dryice_rtc_remove(struct platform_device *pdev)
	rtc_device_unregister(imxdi->rtc);
	rtc_device_unregister(imxdi->rtc);


	clk_disable_unprepare(imxdi->clk);
	clk_disable_unprepare(imxdi->clk);
	clk_put(imxdi->clk);


	return 0;
	return 0;
}
}