scsi: qla4xxx: Fix an error handling path in 'qla4xxx_get_host_stats()'
diff mbox series

Message ID 20200802101527.676054-1-christophe.jaillet@wanadoo.fr
State Accepted
Commit 574918e69720fe62ab3eb42ec3750230c8d16b06
Headers show
Series
  • scsi: qla4xxx: Fix an error handling path in 'qla4xxx_get_host_stats()'
Related show

Commit Message

Christophe JAILLET Aug. 2, 2020, 10:15 a.m. UTC
Update the size used in 'dma_free_coherent()' in order to match the one
used in the corresponding 'dma_alloc_coherent()'.

Fixes: 4161cee52df8 ("[SCSI] qla4xxx: Add host statistics support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/scsi/qla4xxx/ql4_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen Aug. 31, 2020, 5:41 p.m. UTC | #1
On Sun, 2 Aug 2020 12:15:27 +0200, Christophe JAILLET wrote:

> Update the size used in 'dma_free_coherent()' in order to match the one
> used in the corresponding 'dma_alloc_coherent()'.

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: qla4xxx: Fix an error handling path in 'qla4xxx_get_host_stats()'
      https://git.kernel.org/mkp/scsi/c/574918e69720

Patch
diff mbox series

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index bab87e47b238..3c44f1d2802a 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1254,7 +1254,7 @@  static int qla4xxx_get_host_stats(struct Scsi_Host *shost, char *buf, int len)
 			le64_to_cpu(ql_iscsi_stats->iscsi_sequence_error);
 exit_host_stats:
 	if (ql_iscsi_stats)
-		dma_free_coherent(&ha->pdev->dev, host_stats_size,
+		dma_free_coherent(&ha->pdev->dev, stats_size,
 				  ql_iscsi_stats, iscsi_stats_dma);
 
 	ql4_printk(KERN_INFO, ha, "%s: Get host stats done\n",