瀏覽代碼

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 <t-kristo@ti.com>
Tero Kristo 6 年之前
父節點
當前提交
ac1cd35e2e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/crypto/omap-aes.c

+ 2 - 1
drivers/crypto/omap-aes.c

@@ -1312,7 +1312,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;
 }