Commit 17cf2c5d authored by Madhuranath Iyengar's avatar Madhuranath Iyengar Committed by James Bottomley

[SCSI] qla2xxx: Don't issue set or get port param MBC if invalid port loop id

Signed-off-by: default avatarGiridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent c01be6dc
......@@ -1222,6 +1222,13 @@ qla24xx_iidma(struct fc_bsg_job *bsg_job)
return -EINVAL;
}
if (fcport->loop_id == FC_NO_LOOP_ID) {
DEBUG2(printk(KERN_ERR "%s(%ld): Invalid port loop id, "
"loop_id = 0x%x\n",
__func__, vha->host_no, fcport->loop_id));
return -EINVAL;
}
if (port_param->mode)
rval = qla2x00_set_idma_speed(vha, fcport->loop_id,
port_param->speed, mb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment