Commit 41e960b0 authored by Gregory CLEMENT's avatar Gregory CLEMENT Committed by Greg Kroah-Hartman

crypto: inside-secure - fix clock management

commit f962eb46 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: 1b44c5a6 ("crypto: inside-secure - add SafeXcel EIP197 crypto
engine driver")
cc: stable@vger.kernel.org
Signed-off-by: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 77827f3d
......@@ -789,7 +789,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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment