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 07:50:16 -0700 |
commit | ad490b6e70c5756d0479ce1a7336626859b8b546 (patch) | |
tree | 439b360b9be34a862d46bd51c239d467bbacb635 /drivers/scsi/lpfc/lpfc_scsi.c | |
parent | 6c7cf486d35e0441c81f9bb8c49e6c826028bbb6 (diff) | |
download | linux-ad490b6e70c5756d0479ce1a7336626859b8b546.tar.gz linux-ad490b6e70c5756d0479ce1a7336626859b8b546.tar.bz2 linux-ad490b6e70c5756d0479ce1a7336626859b8b546.zip |
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/lpfc_scsi.c')
-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) int status; rdata = lpfc_rport_data_from_scsi_device(cmnd->device); - if (!rdata) { + if (!rdata || !rdata->pnode) { lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, - "0798 Device Reset rport failure: rdata x%p\n", rdata); + "0798 Device Reset rport failure: rdata x%p\n", + rdata); return FAILED; } pnode = rdata->pnode; |