mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
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: 26bfe3d0b2 ("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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user