aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <[email protected]>2021-12-01 14:25:28 +0100
committerMichael S. Tsirkin <[email protected]>2022-01-14 18:50:52 -0500
commit9f8b4ae2ac7dc5ff6e5dfa723c1ef2bad80a8c68 (patch)
treed6aa260a9d243b44d7bee5e14abfae0fd3edfd09
parent1b656e9aad7f4886ed466094d1dc5ee4dd900d20 (diff)
firmware: qemu_fw_cfg: remove sysfs entries explicitly
Explicitly remove the file entries from sysfs before dropping the final reference for symmetry reasons and for consistency with the rest of the driver. Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
-rw-r--r--drivers/firmware/qemu_fw_cfg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c
index f08e056ed0ae..b436342115af 100644
--- a/drivers/firmware/qemu_fw_cfg.c
+++ b/drivers/firmware/qemu_fw_cfg.c
@@ -389,6 +389,7 @@ static void fw_cfg_sysfs_cache_cleanup(void)
list_for_each_entry_safe(entry, next, &fw_cfg_entry_cache, list) {
fw_cfg_sysfs_cache_delist(entry);
+ kobject_del(&entry->kobj);
kobject_put(&entry->kobj);
}
}