[PATCHv2,03/22] crypto: omap-aes: remove the sysfs group during driver removal
diff mbox series

Message ID 20191105140111.20285-4-t-kristo@ti.com
State New
Headers show
  • crypto: omap-sham: fixes towards 5.5
Related show

Commit Message

Tero Kristo Nov. 5, 2019, 2 p.m. UTC
The driver removal should also cleanup the created sysfs group. If not,
the driver fails the subsequent probe as the files exist already. Also,
drop a completely unnecessary pointer assignment from the removal
function at the same time.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
 drivers/crypto/omap-aes.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff mbox series

diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index a1fc03ed01f3..38c750e83dbe 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -1296,7 +1296,8 @@  static int omap_aes_remove(struct platform_device *pdev)
-	dd = NULL;
+	sysfs_remove_group(&dd->dev->kobj, &omap_aes_attr_group);
 	return 0;