mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
net: enetc: clean up before returning in probe()
We recently added this error path. We need to call enetc_pci_remove()
before returning. It cleans up the resources from enetc_pci_probe().
Fixes: 99100d0d99
("net: enetc: add preliminary support for i.MX95 ENETC PF")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/93888efa-c838-4682-a7e5-e6bf318e844e@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
575092a7f0
commit
f66af96161
@ -174,9 +174,11 @@ static int enetc_vf_probe(struct pci_dev *pdev,
|
||||
si = pci_get_drvdata(pdev);
|
||||
si->revision = ENETC_REV_1_0;
|
||||
err = enetc_get_driver_data(si);
|
||||
if (err)
|
||||
return dev_err_probe(&pdev->dev, err,
|
||||
"Could not get VF driver data\n");
|
||||
if (err) {
|
||||
dev_err_probe(&pdev->dev, err,
|
||||
"Could not get VF driver data\n");
|
||||
goto err_alloc_netdev;
|
||||
}
|
||||
|
||||
enetc_get_si_caps(si);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user