diff options
author | Johan Hovold <johan@kernel.org> | 2021-12-01 16:25:28 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-01-15 02:50:52 +0300 |
commit | 9f8b4ae2ac7dc5ff6e5dfa723c1ef2bad80a8c68 (patch) | |
tree | d6aa260a9d243b44d7bee5e14abfae0fd3edfd09 | |
parent | 1b656e9aad7f4886ed466094d1dc5ee4dd900d20 (diff) | |
download | linux-9f8b4ae2ac7dc5ff6e5dfa723c1ef2bad80a8c68.tar.xz |
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 <johan@kernel.org>
Link: https://lore.kernel.org/r/20211201132528.30025-5-johan@kernel.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | drivers/firmware/qemu_fw_cfg.c | 1 |
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); } } |