4.16-stable review patch.  If anyone has any objections, please let me know.


From: Gregory CLEMENT <gregory.clem...@bootlin.com>

commit f962eb46e7a9b98a58d2483f5eb216e738fec732 upstream.

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: sta...@vger.kernel.org
Signed-off-by: Gregory CLEMENT <gregory.clem...@bootlin.com>
Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

 drivers/crypto/inside-secure/safexcel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/crypto/inside-secure/safexcel.c
+++ b/drivers/crypto/inside-secure/safexcel.c
@@ -894,7 +894,7 @@ static int safexcel_probe(struct platfor
                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) {

Reply via email to