diff options
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index e1cc0d21d890..40e3cafb3a9c 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -1543,11 +1543,9 @@ static int qla4xxx_eh_device_reset(struct scsi_cmnd *cmd) | |||
1543 | { | 1543 | { |
1544 | struct scsi_qla_host *ha = to_qla_host(cmd->device->host); | 1544 | struct scsi_qla_host *ha = to_qla_host(cmd->device->host); |
1545 | struct ddb_entry *ddb_entry = cmd->device->hostdata; | 1545 | struct ddb_entry *ddb_entry = cmd->device->hostdata; |
1546 | struct srb *sp; | ||
1547 | int ret = FAILED, stat; | 1546 | int ret = FAILED, stat; |
1548 | 1547 | ||
1549 | sp = (struct srb *) cmd->SCp.ptr; | 1548 | if (!ddb_entry) |
1550 | if (!sp || !ddb_entry) | ||
1551 | return ret; | 1549 | return ret; |
1552 | 1550 | ||
1553 | dev_info(&ha->pdev->dev, | 1551 | dev_info(&ha->pdev->dev, |