diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2010-03-18 09:52:45 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 10:24:10 -0400 |
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 b966678e4419..90a1dff7eb84 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -2339,6 +2339,8 @@ mptscsih_slave_destroy(struct scsi_device *sdev) | |||
2339 | starget = scsi_target(sdev); | 2339 | starget = scsi_target(sdev); |
2340 | vtarget = starget->hostdata; | 2340 | vtarget = starget->hostdata; |
2341 | vdevice = sdev->hostdata; | 2341 | vdevice = sdev->hostdata; |
2342 | if (!vdevice) | ||
2343 | return; | ||
2342 | 2344 | ||
2343 | mptscsih_search_running_cmds(hd, vdevice); | 2345 | mptscsih_search_running_cmds(hd, vdevice); |
2344 | vtarget->num_luns--; | 2346 | vtarget->num_luns--; |