summaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-27 19:06:30 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-27 19:06:30 +0200
commitd459094083c3a23b31514bbe31cc3f4c21ed4445 (patch)
tree7b4b1c034163898c51272d5fc9f934ec23cdb491 /drivers/message
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb (diff)
parent[SCSI] gdth: fix oops in gdth_copy_cmd() (diff)
downloadlinux-d459094083c3a23b31514bbe31cc3f4c21ed4445.tar.xz
linux-d459094083c3a23b31514bbe31cc3f4c21ed4445.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] gdth: fix oops in gdth_copy_cmd() [SCSI] mptsas: Fix oops for insmod during kexec [SCSI] lpfc: avoid double-free during PCI error failure
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptsas.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 404c014db1bd..1d2d03f77894 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -815,7 +815,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
static int
mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
{
- MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
+ MPT_SCSI_HOST *hd;
struct mptsas_target_reset_event *target_reset_list, *n;
int rc;
@@ -827,7 +827,10 @@ mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
if (reset_phase != MPT_IOC_POST_RESET)
goto out;
- if (!hd || !hd->ioc)
+ if (!ioc->sh || !ioc->sh->hostdata)
+ goto out;
+ hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
+ if (!hd->ioc)
goto out;
if (list_empty(&hd->target_reset_list))