Commit dbb8df5c authored by Dinghao Liu's avatar Dinghao Liu Committed by Jon Mason

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: 26bfe3d0 ("ntb: intel: Add Icelake (gen4) support for Intel NTB")
Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent 44a0a3c1
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment