diff --git a/drivers/firmware/dmi-sysfs.c b/drivers/firmware/dmi-sysfs.c index eb26d62e5188a9d4cff9b00ce8f92d45ef80809f..66200ed5e6a13104f293c0f6fcb3e688711e6a8c 100644 --- a/drivers/firmware/dmi-sysfs.c +++ b/drivers/firmware/dmi-sysfs.c @@ -553,7 +553,7 @@ static const struct bin_attribute dmi_entry_raw_attr = { static void dmi_sysfs_entry_release(struct kobject *kobj) { struct dmi_sysfs_entry *entry = to_entry(kobj); - sysfs_remove_bin_file(&entry->kobj, &dmi_entry_raw_attr); + spin_lock(&entry_list_lock); list_del(&entry->list); spin_unlock(&entry_list_lock);