diff options
author | Dinghao Liu <dinghao.liu@zju.edu.cn> | 2020-08-23 08:55:12 +0200 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2020-08-24 16:44:47 +0200 |
commit | dbb8df5c2d27610a87b0168a8acc89d73fbfde94 (patch) | |
tree | f219742a174b0dfd521e058ce0c919e154455505 | |
parent | NTB: hw: amd: fix an issue about leak system resources (diff) | |
download | linux-dbb8df5c2d27610a87b0168a8acc89d73fbfde94.tar.xz linux-dbb8df5c2d27610a87b0168a8acc89d73fbfde94.zip |
ntb: intel: Fix memleak in intel_ntb_pci_probe
The default error branch of a series of pdev_is_gen calls
should free ndev just like what we've done in these calls.
Fixes: 26bfe3d0b227 ("ntb: intel: Add Icelake (gen4) support for Intel NTB")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
-rw-r--r-- | drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |