lpfc: Fix driver crash when module parameter lpfc_fcp_io_channel set to 16

Fix driver crash when module parameter lpfc_fcp_io_channel set to 16

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
James Smart 2015-12-16 18:11:56 -05:00 committed by Martin K. Petersen
parent 4b7789b71c
commit 6690e0d4fc
1 changed files with 6 additions and 3 deletions

View File

@ -8833,9 +8833,12 @@ found:
* already mapped to this phys_id.
*/
if (cpup->irq != LPFC_VECTOR_MAP_EMPTY) {
chann[saved_chann] =
cpup->channel_id;
saved_chann++;
if (saved_chann <=
LPFC_FCP_IO_CHAN_MAX) {
chann[saved_chann] =
cpup->channel_id;
saved_chann++;
}
goto out;
}