Linux PCI Non-Transparent Bridge framework and drivers
 help / color / mirror / Atom feed
* [PATCH] ntb: intel: Fix memleak in intel_ntb_pci_probe
@ 2020-08-23  6:55 Dinghao Liu
  2020-08-24 14:37 ` Dave Jiang
  0 siblings, 1 reply; 3+ messages in thread
From: Dinghao Liu @ 2020-08-23  6:55 UTC (permalink / raw)
  To: dinghao.liu, kjlu
  Cc: Dave Jiang, Jon Mason, Allen Hubbe, linux-ntb, linux-kernel

The default error branch of a series of pdev_is_gen calls
should free ndev just like what we've done in these calls.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
 drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ntb/hw/intel/ntb_hw_gen1.c b/drivers/ntb/hw/intel/ntb_hw_gen1.c
index 3185efeab487..093dd20057b9 100644
--- a/drivers/ntb/hw/intel/ntb_hw_gen1.c
+++ b/drivers/ntb/hw/intel/ntb_hw_gen1.c
@@ -1893,7 +1893,7 @@ static int intel_ntb_pci_probe(struct pci_dev *pdev,
 			goto err_init_dev;
 	} else {
 		rc = -EINVAL;
-		goto err_ndev;
+		goto err_init_pci;
 	}
 
 	ndev_reset_unsafe_flags(ndev);
-- 
2.17.1


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

end of thread, other threads:[~2020-08-24 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-23  6:55 [PATCH] ntb: intel: Fix memleak in intel_ntb_pci_probe Dinghao Liu
2020-08-24 14:37 ` Dave Jiang
2020-08-24 14:48   ` Jon Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox