[SCSI] mptfusion: sanity check for vdevice pointer is added
[pandora-kernel.git] / drivers / message / fusion / mptscsih.c
index b966678..90a1dff 100644 (file)
@@ -2339,6 +2339,8 @@ mptscsih_slave_destroy(struct scsi_device *sdev)
        starget = scsi_target(sdev);
        vtarget = starget->hostdata;
        vdevice = sdev->hostdata;
+       if (!vdevice)
+               return;
 
        mptscsih_search_running_cmds(hd, vdevice);
        vtarget->num_luns--;