Skip to content

Commit 23f1b8d

Browse files
elmarcomstsirkin
authored andcommitted
fw_cfg: fix driver remove
On driver remove(), all objects created during probe() should be removed, but sysfs qemu_fw_cfg/rev file was left. Also reorder functions to match probe() error cleanup code. Cc: [email protected] Signed-off-by: Marc-André Lureau <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent c1d0c3f commit 23f1b8d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/firmware/qemu_fw_cfg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,10 @@ static int fw_cfg_sysfs_remove(struct platform_device *pdev)
582582
{
583583
pr_debug("fw_cfg: unloading.\n");
584584
fw_cfg_sysfs_cache_cleanup();
585+
sysfs_remove_file(fw_cfg_top_ko, &fw_cfg_rev_attr.attr);
586+
fw_cfg_io_cleanup();
585587
fw_cfg_kset_unregister_recursive(fw_cfg_fname_kset);
586588
fw_cfg_kobj_cleanup(fw_cfg_sel_ko);
587-
fw_cfg_io_cleanup();
588589
return 0;
589590
}
590591

0 commit comments

Comments
 (0)