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>
This commit is contained in:
parent
6c7cf486d3
commit
ad490b6e70
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue