Skip to contentSkip to conversation

request for 4.14-stable: 23f1b8d938c8 ("fw_cfg: fix driver remove")

PATCH Sudip Mukherjee 2 participants 2 messages Jul 30, 2018 – Aug 16, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Greg,

This was missing in 4.14-stable. Please apply to your queue.

--
Regards
Sudip

Quoted 1 line

From 73b4c9260ca8d719d02e981f0dbe05ce5dcbf41e Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <[email protected]>
Date: Mon, 20 Nov 2017 10:55:15 +0100
Subject: [PATCH] fw_cfg: fix driver remove
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

commit 23f1b8d938c861ee0bbb786162f7ce0685f722ec upstream

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.

---
 drivers/firmware/qemu_fw_cfg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/firmware/qemu_fw_cfg.c +2 -1
index 0e2011636fbb..c53c7ac992f8 100644
@@ -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;
 }
 
Signature · 1 line
2.11.0
#1 lore raw
Quoted 3 lines · Sudip Mukherjee

Hi Greg,

This was missing in 4.14-stable. Please apply to your queue.

Odd, I don't know how I missed this one either. thanks for sending it, now applied.

greg k-h