[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171123140206.3911-2-marcandre.lureau@redhat.com>
Date: Thu, 23 Nov 2017 15:02:02 +0100
From: Marc-André Lureau <marcandre.lureau@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: somlo@....edu, xiaolong.ye@...el.com, qemu-devel@...gnu.org,
mst@...hat.com,
Marc-André Lureau <marcandre.lureau@...hat.com>
Subject: [PATCH v8 1/5] 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.
Signed-off-by: Marc-André Lureau <marcandre.lureau@...hat.com>
---
drivers/firmware/qemu_fw_cfg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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)
{
pr_debug("fw_cfg: unloading.\n");
fw_cfg_sysfs_cache_cleanup();
+ sysfs_remove_file(fw_cfg_top_ko, &fw_cfg_rev_attr.attr);
+ fw_cfg_io_cleanup();
fw_cfg_kset_unregister_recursive(fw_cfg_fname_kset);
fw_cfg_kobj_cleanup(fw_cfg_sel_ko);
- fw_cfg_io_cleanup();
return 0;
}
--
2.15.0.277.ga3d2ad2c43
Powered by blists - more mailing lists