diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2010-03-18 19:22:45 +0530 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 09:24:10 -0500 |
commit | 08f5c5c23d52aa385ff304becffb0e0c37cedfe5 (patch) | |
tree | 5e6b65987b69ee4c240b413fc682b37935bd13e5 /drivers/message/fusion/mptscsih.c | |
parent | f8c23bde85091b696e72d00bc6aa16216a9862f7 (diff) |
[SCSI] mptfusion: sanity check for vdevice pointer is added
Added sanity checks before accessing vdevice and added vdevice->deleted
setting for mptfc.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index b966678e441..90a1dff7eb8 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c @@ -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--; |