From 08f5c5c23d52aa385ff304becffb0e0c37cedfe5 Mon Sep 17 00:00:00 2001 From: "Kashyap, Desai" Date: Thu, 18 Mar 2010 19:22:45 +0530 Subject: [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 Signed-off-by: James Bottomley --- drivers/message/fusion/mptscsih.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/message/fusion/mptscsih.c') 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--; -- cgit v1.2.3-70-g09d2