netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qlcnic: fix missing release in qlcnic_83xx_interrupt_test.
@ 2020-05-25  8:24 wu000273
  2020-05-26  1:06 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: wu000273 @ 2020-05-25  8:24 UTC (permalink / raw)
  To: shshaikh
  Cc: manishc, GR-Linux-NIC-Dev, davem, kuba, netdev, linux-kernel,
	kjlu, wu000273

From: Qiushi Wu <wu000273@umn.edu>

In function qlcnic_83xx_interrupt_test(), function
qlcnic_83xx_diag_alloc_res() is not handled by function
qlcnic_83xx_diag_free_res() after a call of the function
qlcnic_alloc_mbx_args() failed. Fix this issue by adding
a jump target "fail_mbx_args", and jump to this new target
when qlcnic_alloc_mbx_args() failed.

Fixes: b6b4316c8b2f ("qlcnic: Handle qlcnic_alloc_mbx_args() failure")
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index 2a533280b124..29b9c728a65e 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -3651,7 +3651,7 @@ int qlcnic_83xx_interrupt_test(struct net_device *netdev)
 	ahw->diag_cnt = 0;
 	ret = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_INTRPT_TEST);
 	if (ret)
-		goto fail_diag_irq;
+		goto fail_mbx_args;
 
 	if (adapter->flags & QLCNIC_MSIX_ENABLED)
 		intrpt_id = ahw->intr_tbl[0].id;
@@ -3681,6 +3681,8 @@ int qlcnic_83xx_interrupt_test(struct net_device *netdev)
 
 done:
 	qlcnic_free_mbx_args(&cmd);
+
+fail_mbx_args:
 	qlcnic_83xx_diag_free_res(netdev, drv_sds_rings);
 
 fail_diag_irq:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] qlcnic: fix missing release in qlcnic_83xx_interrupt_test.
  2020-05-25  8:24 [PATCH] qlcnic: fix missing release in qlcnic_83xx_interrupt_test wu000273
@ 2020-05-26  1:06 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-05-26  1:06 UTC (permalink / raw)
  To: wu000273
  Cc: shshaikh, manishc, GR-Linux-NIC-Dev, kuba, netdev, linux-kernel, kjlu

From: wu000273@umn.edu
Date: Mon, 25 May 2020 03:24:39 -0500

> From: Qiushi Wu <wu000273@umn.edu>
> 
> In function qlcnic_83xx_interrupt_test(), function
> qlcnic_83xx_diag_alloc_res() is not handled by function
> qlcnic_83xx_diag_free_res() after a call of the function
> qlcnic_alloc_mbx_args() failed. Fix this issue by adding
> a jump target "fail_mbx_args", and jump to this new target
> when qlcnic_alloc_mbx_args() failed.
> 
> Fixes: b6b4316c8b2f ("qlcnic: Handle qlcnic_alloc_mbx_args() failure")
> Signed-off-by: Qiushi Wu <wu000273@umn.edu>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-26  1:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  8:24 [PATCH] qlcnic: fix missing release in qlcnic_83xx_interrupt_test wu000273
2020-05-26  1:06 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).