Skip to content

Commit 22e786e

Browse files
Quinn Tranmartinkpetersen
authored andcommitted
scsi: qla2xxx: Fix gpnid error processing
Stop GPNID command from advancing if command has failed. Fixes: 726b854 ("qla2xxx: Add framework for async fabric discovery") Cc: <stable@vger.kernel.org> # 4.10+ Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 2e01d0b commit 22e786e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/scsi/qla2xxx/qla_gs.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3211,6 +3211,11 @@ static void qla2x00_async_gpnid_sp_done(void *s, int res)
32113211
sp->name, res, ct_req->req.port_id.port_id,
32123212
ct_rsp->rsp.gpn_id.port_name);
32133213

3214+
if (res) {
3215+
sp->free(sp);
3216+
return;
3217+
}
3218+
32143219
memset(&ea, 0, sizeof(ea));
32153220
memcpy(ea.port_name, ct_rsp->rsp.gpn_id.port_name, WWN_SIZE);
32163221
ea.sp = sp;

0 commit comments

Comments
 (0)