public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: tegra - Remove an incorrect iommu_fwspec_free() call in tegra_se_remove()
@ 2024-05-25 15:14 Christophe JAILLET
  2024-05-29  6:40 ` Akhil R
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Christophe JAILLET @ 2024-05-25 15:14 UTC (permalink / raw)
  To: Akhil R, Herbert Xu, David S. Miller, Thierry Reding,
	Jonathan Hunter
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-crypto,
	linux-tegra

The only iommu function call in this driver is a
tegra_dev_iommu_get_stream_id() which does not allocate anything and does
not take any reference.

More-over, what is freed is "se->dev" which has been devm_kzalloc()'ed in
the probe.

So there is no point in calling iommu_fwspec_free() in the remove function.

Remove this incorrect function call.

Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested only

This patch is completely speculative. *Review with care*.
---
 drivers/crypto/tegra/tegra-se-main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/crypto/tegra/tegra-se-main.c b/drivers/crypto/tegra/tegra-se-main.c
index 9955874b3dc3..f94c0331b148 100644
--- a/drivers/crypto/tegra/tegra-se-main.c
+++ b/drivers/crypto/tegra/tegra-se-main.c
@@ -326,7 +326,6 @@ static void tegra_se_remove(struct platform_device *pdev)
 
 	crypto_engine_stop(se->engine);
 	crypto_engine_exit(se->engine);
-	iommu_fwspec_free(se->dev);
 	host1x_client_unregister(&se->client);
 }
 
-- 
2.45.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-31 20:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-25 15:14 [PATCH] crypto: tegra - Remove an incorrect iommu_fwspec_free() call in tegra_se_remove() Christophe JAILLET
2024-05-29  6:40 ` Akhil R
2024-05-29  6:53 ` Akhil R
2024-05-30 10:30   ` Thierry Reding
2024-05-31  5:23   ` Herbert Xu
2024-05-31  5:36     ` Akhil R
2024-05-31 20:04       ` Marion & Christophe JAILLET
2024-05-31 10:24 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox