Skip to content

Commit

Permalink
hwrng: omap3-rom - Use devm_clk_get()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Herbert Xu committed Mar 10, 2014
1 parent 0c0becd commit 0574bce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/char/hw_random/omap3-rom-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down

0 comments on commit 0574bce

Please sign in to comment.