Merge branch 'stable/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Aug 2010 01:06:15 +0000 (18:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Aug 2010 01:06:15 +0000 (18:06 -0700)
* 'stable/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft-2.6:
  firmware: ibft depends on SCSI
  ibft: Kernel oops when rmmoding iscsi_ibft with no iBFT present.

drivers/firmware/Kconfig
drivers/firmware/iscsi_ibft.c

index a6c670b8ce5247f4a9b3674163af0f6a3faf1ccb..d4ed8e98edf7b23fb9fd676c92ecfe3bb14c9e3c 100644 (file)
@@ -133,7 +133,7 @@ config ISCSI_BOOT_SYSFS
 config ISCSI_IBFT
        tristate "iSCSI Boot Firmware Table Attributes module"
        select ISCSI_BOOT_SYSFS
-       depends on ISCSI_IBFT_FIND
+       depends on ISCSI_IBFT_FIND && SCSI
        default n
        help
          This option enables support for detection and exposing of iSCSI
index 4f04ec0410a030e20308b76c1cef34a65c14fdef..6148a1c67895a1d223aa50898d33b775c50b1a27 100644 (file)
@@ -727,8 +727,10 @@ static void ibft_unregister(void)
 
 static void ibft_cleanup(void)
 {
-       ibft_unregister();
-       iscsi_boot_destroy_kset(boot_kset);
+       if (boot_kset) {
+               ibft_unregister();
+               iscsi_boot_destroy_kset(boot_kset);
+       }
 }
 
 static void __exit ibft_exit(void)