mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
[SCSI] qla2xxx: Add check for null fcport references in qla2xxx_queuecommand.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
a55aac79de
commit
aa651be83d
1 changed files with 6 additions and 0 deletions
|
@ -625,6 +625,12 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
|
||||||
cmd->result = DID_NO_CONNECT << 16;
|
cmd->result = DID_NO_CONNECT << 16;
|
||||||
goto qc24_fail_command;
|
goto qc24_fail_command;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!fcport) {
|
||||||
|
cmd->result = DID_NO_CONNECT << 16;
|
||||||
|
goto qc24_fail_command;
|
||||||
|
}
|
||||||
|
|
||||||
if (atomic_read(&fcport->state) != FCS_ONLINE) {
|
if (atomic_read(&fcport->state) != FCS_ONLINE) {
|
||||||
if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
|
if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
|
||||||
atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
|
atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue