diff mbox

[2/3] qla2xxx: fx00 copypaste typo

Message ID alpine.LRH.2.21.1803081544100.23373@math.ut.ee (mailing list archive)
State Accepted
Headers show

Commit Message

Meelis Roos March 8, 2018, 1:44 p.m. UTC
Fix an obvious copy-paste error in freeing QLAFX00 response queue - the code
checked for rsp->ring but freed rsp->ring_fx00.

Signed-off-by: Meelis Roos <mroos@linux.ee>

---
 drivers/scsi/qla2xxx/qla_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Madhani, Himanshu March 20, 2018, 4:03 a.m. UTC | #1
> On Mar 8, 2018, at 5:44 AM, Meelis Roos <mroos@linux.ee> wrote:
> 
> Fix an obvious copy-paste error in freeing QLAFX00 response queue - the code
> checked for rsp->ring but freed rsp->ring_fx00.
> 
> Signed-off-by: Meelis Roos <mroos@linux.ee>
> 
> ---
> drivers/scsi/qla2xxx/qla_os.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index afcb5567..3c7bc2d 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -490,7 +490,7 @@ static void qla2x00_free_req_que(struct qla_hw_data *ha, struct req_que *req)
> static void qla2x00_free_rsp_que(struct qla_hw_data *ha, struct rsp_que *rsp)
> {
> 	if (IS_QLAFX00(ha)) {
> -		if (rsp && rsp->ring)
> +		if (rsp && rsp->ring_fx00)
> 			dma_free_coherent(&ha->pdev->dev,
> 			    (rsp->length_fx00 + 1) * sizeof(request_t),
> 			    rsp->ring_fx00, rsp->dma_fx00);
> -- 
> 2.1.4
> 

Looks good

Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>

Thanks,
- Himanshu
Martin K. Petersen March 21, 2018, 11:04 p.m. UTC | #2
Meelis,

> Fix an obvious copy-paste error in freeing QLAFX00 response queue - the code
> checked for rsp->ring but freed rsp->ring_fx00.

Hand-applied to 4.16/scsi-fixes. Thanks!
diff mbox

Patch

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index afcb5567..3c7bc2d 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -490,7 +490,7 @@  static void qla2x00_free_req_que(struct qla_hw_data *ha, struct req_que *req)
 static void qla2x00_free_rsp_que(struct qla_hw_data *ha, struct rsp_que *rsp)
 {
 	if (IS_QLAFX00(ha)) {
-		if (rsp && rsp->ring)
+		if (rsp && rsp->ring_fx00)
 			dma_free_coherent(&ha->pdev->dev,
 			    (rsp->length_fx00 + 1) * sizeof(request_t),
 			    rsp->ring_fx00, rsp->dma_fx00);