diff options
Diffstat (limited to 'drivers/message/fusion/mptctl.c')
-rw-r--r-- | drivers/message/fusion/mptctl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index e7fab5de16e7..f06b29193b4e 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
@@ -1329,6 +1329,8 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size) | |||
1329 | if (ioc->sh) { | 1329 | if (ioc->sh) { |
1330 | shost_for_each_device(sdev, ioc->sh) { | 1330 | shost_for_each_device(sdev, ioc->sh) { |
1331 | vdevice = sdev->hostdata; | 1331 | vdevice = sdev->hostdata; |
1332 | if (vdevice == NULL || vdevice->vtarget == NULL) | ||
1333 | continue; | ||
1332 | if (vdevice->vtarget->tflags & | 1334 | if (vdevice->vtarget->tflags & |
1333 | MPT_TARGET_FLAGS_RAID_COMPONENT) | 1335 | MPT_TARGET_FLAGS_RAID_COMPONENT) |
1334 | continue; | 1336 | continue; |
@@ -1450,6 +1452,8 @@ mptctl_gettargetinfo (unsigned long arg) | |||
1450 | if (!maxWordsLeft) | 1452 | if (!maxWordsLeft) |
1451 | continue; | 1453 | continue; |
1452 | vdevice = sdev->hostdata; | 1454 | vdevice = sdev->hostdata; |
1455 | if (vdevice == NULL || vdevice->vtarget == NULL) | ||
1456 | continue; | ||
1453 | if (vdevice->vtarget->tflags & | 1457 | if (vdevice->vtarget->tflags & |
1454 | MPT_TARGET_FLAGS_RAID_COMPONENT) | 1458 | MPT_TARGET_FLAGS_RAID_COMPONENT) |
1455 | continue; | 1459 | continue; |
@@ -1978,6 +1982,9 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr) | |||
1978 | struct scsi_target *starget = scsi_target(sdev); | 1982 | struct scsi_target *starget = scsi_target(sdev); |
1979 | VirtTarget *vtarget = starget->hostdata; | 1983 | VirtTarget *vtarget = starget->hostdata; |
1980 | 1984 | ||
1985 | if (vtarget == NULL) | ||
1986 | continue; | ||
1987 | |||
1981 | if ((pScsiReq->TargetID == vtarget->id) && | 1988 | if ((pScsiReq->TargetID == vtarget->id) && |
1982 | (pScsiReq->Bus == vtarget->channel) && | 1989 | (pScsiReq->Bus == vtarget->channel) && |
1983 | (vtarget->tflags & MPT_TARGET_FLAGS_Q_YES)) | 1990 | (vtarget->tflags & MPT_TARGET_FLAGS_Q_YES)) |