diff options
author | James Smart <james.smart@emulex.com> | 2015-04-07 15:07:26 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-04-10 10:50:16 -0400 |
commit | ad490b6e70c5756d0479ce1a7336626859b8b546 (patch) | |
tree | 439b360b9be34a862d46bd51c239d467bbacb635 /drivers/scsi/lpfc | |
parent | 6c7cf486d35e0441c81f9bb8c49e6c826028bbb6 (diff) |
lpfc: Fix crash in device reset handler.
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 5612ba6bf213..ea818f0ec218 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -5118,9 +5118,10 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd) | |||
5118 | int status; | 5118 | int status; |
5119 | 5119 | ||
5120 | rdata = lpfc_rport_data_from_scsi_device(cmnd->device); | 5120 | rdata = lpfc_rport_data_from_scsi_device(cmnd->device); |
5121 | if (!rdata) { | 5121 | if (!rdata || !rdata->pnode) { |
5122 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 5122 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
5123 | "0798 Device Reset rport failure: rdata x%p\n", rdata); | 5123 | "0798 Device Reset rport failure: rdata x%p\n", |
5124 | rdata); | ||
5124 | return FAILED; | 5125 | return FAILED; |
5125 | } | 5126 | } |
5126 | pnode = rdata->pnode; | 5127 | pnode = rdata->pnode; |