crypto: caam - Fix the pointer passed to caam_qi_shutdown()
BugLink: https://bugs.launchpad.net/bugs/2101915
[ Upstream commit ad980b04f51f7fb503530bd1cb328ba5e75a250e ]
The type of the last parameter given to devm_add_action_or_reset() is
"struct caam_drv_private *", but in caam_qi_shutdown(), it is casted to
"struct device *".
Pass the correct parameter to devm_add_action_or_reset() so that the
resources are released as expected.
Fixes: f414de2e2f ("crypto: caam - use devres to de-initialize QI")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
CVE-2024-56754
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
4026033899
commit
3e1a2cea82
@@ -772,7 +772,7 @@ int caam_qi_init(struct platform_device *caam_pdev)
|
||||
|
||||
caam_debugfs_qi_init(ctrlpriv);
|
||||
|
||||
err = devm_add_action_or_reset(qidev, caam_qi_shutdown, ctrlpriv);
|
||||
err = devm_add_action_or_reset(qidev, caam_qi_shutdown, qidev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user