scsi: qla2xxx: Use sp->free instead of hard coded call.

Calling sp->free() ensures the context-correct free routine is called.

Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Joe Carnuccio 2017-08-23 15:05:09 -07:00 committed by Martin K. Petersen
parent e0824e69bd
commit f3caa9905d

View File

@ -742,7 +742,7 @@ qla2x00_sp_compl(void *ptr, int res)
if (!atomic_dec_and_test(&sp->ref_count))
return;
qla2x00_sp_free_dma(sp);
sp->free(sp);
cmd->scsi_done(cmd);
}
@ -814,7 +814,7 @@ qla2xxx_qpair_sp_compl(void *ptr, int res)
if (!atomic_dec_and_test(&sp->ref_count))
return;
qla2xxx_qpair_sp_free_dma(sp);
sp->free(sp);
cmd->scsi_done(cmd);
}
@ -935,7 +935,7 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
return 0;
qc24_host_busy_free_sp:
qla2x00_sp_free_dma(sp);
sp->free(sp);
qc24_host_busy:
return SCSI_MLQUEUE_HOST_BUSY;
@ -1024,7 +1024,7 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd,
return 0;
qc24_host_busy_free_sp:
qla2xxx_qpair_sp_free_dma(sp);
sp->free(sp);
qc24_host_busy:
return SCSI_MLQUEUE_HOST_BUSY;