summaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random/omap-rng.c
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@bootlin.com>2018-02-28 15:27:22 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2018-03-09 15:45:40 +0100
commit10bc320bc9d7f335651c7740b1c6034ba4bfc4f4 (patch)
tree1b5ae6ba675f6a05a3d9c28c42bf12d5e71329c0 /drivers/char/hw_random/omap-rng.c
parentcrypto: omap-aes - make queue length configurable (diff)
downloadlinux-10bc320bc9d7f335651c7740b1c6034ba4bfc4f4.tar.xz
linux-10bc320bc9d7f335651c7740b1c6034ba4bfc4f4.zip
hwrng: omap - Remove useless test before clk_disable_unprepare
clk_disable_unprepare() already checks that the clock pointer is valid. No need to test it before calling it. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--drivers/char/hw_random/omap-rng.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 74d11ae6abe9..159d4a1347b8 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -499,8 +499,7 @@ err_register:
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
- if (!IS_ERR(priv->clk))
- clk_disable_unprepare(priv->clk);
+ clk_disable_unprepare(priv->clk);
err_ioremap:
dev_err(dev, "initialization failed.\n");
return ret;
@@ -517,8 +516,7 @@ static int omap_rng_remove(struct platform_device *pdev)
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
- if (!IS_ERR(priv->clk))
- clk_disable_unprepare(priv->clk);
+ clk_disable_unprepare(priv->clk);
return 0;
}