From: Madhuranath Iyengar <madhuranath.iyengar@xxxxxxxxxx> Signed-off-by: Giridhar Malavali <giridhar.malavali@xxxxxxxxxx> --- drivers/scsi/qla2xxx/qla_bsg.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index 3a02483..20eaa1c 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c @@ -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); -- 1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html