summaryrefslogtreecommitdiff
path: root/drivers/char/hw_random/omap3-rom-rng.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hw_random/omap3-rom-rng.c')
-rw-r--r--drivers/char/hw_random/omap3-rom-rng.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c
index 37a58d78aab3..3324a7f4bee3 100644
--- a/drivers/char/hw_random/omap3-rom-rng.c
+++ b/drivers/char/hw_random/omap3-rom-rng.c
@@ -114,7 +114,8 @@ static int omap3_rom_rng_remove(struct platform_device *pdev)
{
cancel_delayed_work_sync(&idle_work);
hwrng_unregister(&omap3_rom_rng_ops);
- clk_disable_unprepare(rng_clk);
+ if (!rng_idle)
+ clk_disable_unprepare(rng_clk);
return 0;
}