firmware: dmi-sysfs: Don't remove dmi-sysfs "raw" file explicitly
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 5 Dec 2013 23:46:28 +0000 (16:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2013 02:23:42 +0000 (18:23 -0800)
commita61aca2854eaecf2d1bffbaf1fc368fb1a20c850
tree268cd2844c7a537f2997b0c931508a8385ea53b3
parent68aeeaaaf86b61c78dca09879ce262778a9080e4
firmware: dmi-sysfs: Don't remove dmi-sysfs "raw" file explicitly

Removing the dmi-sysfs module causes the following warning:

  # modprobe -r dmi_sysfs
  WARNING: CPU: 11 PID: 6785 at fs/sysfs/inode.c:325 sysfs_hash_and_remove+0xa9/0xb0()
  sysfs: can not remove 'raw', no directory

This is because putting the entry kobject, e.g., for
"/sys/firmware/dmi/entries/19-0", removes the directory and all its
contents.  By the time dmi_sysfs_entry_release() runs, the "raw" file
inside ".../19-0/" has already been removed.

Therefore, we don't need to remove the "raw" bin file at all in
dmi_sysfs_entry_release().

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/dmi-sysfs.c