summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@bootlin.com>2018-03-13 17:48:40 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2018-03-23 23:39:58 +0800
commitf962eb46e7a9b98a58d2483f5eb216e738fec732 (patch)
treea210fff1fb4ed95b917e25bbec52cc42edf33fb0 /drivers/crypto
parentefa94457e57f7b45207554db6e7f1fdaabd0f198 (diff)
downloadlinux-f962eb46e7a9b98a58d2483f5eb216e738fec732.tar.gz
linux-f962eb46e7a9b98a58d2483f5eb216e738fec732.tar.bz2
linux-f962eb46e7a9b98a58d2483f5eb216e738fec732.zip
crypto: inside-secure - fix clock management
In this driver the clock is got but never put when the driver is removed or if there is an error in the probe. Using the managed version of clk_get() allows to let the kernel take care of it. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") cc: stable@vger.kernel.org Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/inside-secure/safexcel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
index 384b4ceb37f0..09adeaa0da6b 100644
--- a/drivers/crypto/inside-secure/safexcel.c
+++ b/drivers/crypto/inside-secure/safexcel.c
@@ -881,7 +881,7 @@ static int safexcel_probe(struct platform_device *pdev)
return PTR_ERR(priv->base);
}
- priv->clk = of_clk_get(dev->of_node, 0);
+ priv->clk = devm_clk_get(&pdev->dev, NULL);
if (!IS_ERR(priv->clk)) {
ret = clk_prepare_enable(priv->clk);
if (ret) {