hwrng: omap3-rom - Use devm_clk_get()
Use devm_clk_get() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
0c0becd026
commit
0574bce969
|
@ -103,7 +103,7 @@ static int omap3_rom_rng_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
setup_timer(&idle_timer, omap3_rom_rng_idle, 0);
|
||||
rng_clk = clk_get(&pdev->dev, "ick");
|
||||
rng_clk = devm_clk_get(&pdev->dev, "ick");
|
||||
if (IS_ERR(rng_clk)) {
|
||||
pr_err("unable to get RNG clock\n");
|
||||
return PTR_ERR(rng_clk);
|
||||
|
@ -120,7 +120,6 @@ static int omap3_rom_rng_remove(struct platform_device *pdev)
|
|||
{
|
||||
hwrng_unregister(&omap3_rom_rng_ops);
|
||||
clk_disable_unprepare(rng_clk);
|
||||
clk_put(rng_clk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue