From: Tero Kristo Date: Tue, 5 Nov 2019 14:00:52 +0000 (+0200) Subject: crypto: omap-aes - remove the sysfs group during driver removal X-Git-Tag: v5.10.7~3034^2~212 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7508ef2a67416e7786d7325cffe381aded1e0b3;p=platform%2Fkernel%2Flinux-rpi.git crypto: omap-aes - remove the sysfs group during driver removal 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 Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index a1fc03e..38c750e 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) tasklet_kill(&dd->done_task); omap_aes_dma_cleanup(dd); pm_runtime_disable(dd->dev); - dd = NULL; + + sysfs_remove_group(&dd->dev->kobj, &omap_aes_attr_group); return 0; }