diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-11-20 04:55:15 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-12-01 09:55:09 -0500 |
commit | 23f1b8d938c861ee0bbb786162f7ce0685f722ec (patch) | |
tree | 53dd8e0a605143f6bba1cbc5e0473c66c3c4c0b0 | |
parent | c1d0c3f623ada808904dec676da0126f5b800630 (diff) |
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: stable@vger.kernel.org
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | drivers/firmware/qemu_fw_cfg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c index 5cfe39f7a45f..deb483064f53 100644 --- a/drivers/firmware/qemu_fw_cfg.c +++ b/drivers/firmware/qemu_fw_cfg.c | |||
@@ -582,9 +582,10 @@ static int fw_cfg_sysfs_remove(struct platform_device *pdev) | |||
582 | { | 582 | { |
583 | pr_debug("fw_cfg: unloading.\n"); | 583 | pr_debug("fw_cfg: unloading.\n"); |
584 | fw_cfg_sysfs_cache_cleanup(); | 584 | fw_cfg_sysfs_cache_cleanup(); |
585 | sysfs_remove_file(fw_cfg_top_ko, &fw_cfg_rev_attr.attr); | ||
586 | fw_cfg_io_cleanup(); | ||
585 | fw_cfg_kset_unregister_recursive(fw_cfg_fname_kset); | 587 | fw_cfg_kset_unregister_recursive(fw_cfg_fname_kset); |
586 | fw_cfg_kobj_cleanup(fw_cfg_sel_ko); | 588 | fw_cfg_kobj_cleanup(fw_cfg_sel_ko); |
587 | fw_cfg_io_cleanup(); | ||
588 | return 0; | 589 | return 0; |
589 | } | 590 | } |
590 | 591 | ||