Commit f03e4f8a authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

net: aquantia: Fix error return code in aq_pci_probe()

Fix to return error code -ENOMEM from the aq_ndev_alloc() error
handling case instead of 0, as done elsewhere in this function.

Fixes: 23ee07ad ("net: aquantia: Cleanup pci functions module")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarIgor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e58decc9
......@@ -210,8 +210,10 @@ static int aq_pci_probe(struct pci_dev *pdev,
goto err_pci_func;
ndev = aq_ndev_alloc();
if (!ndev)
if (!ndev) {
err = -ENOMEM;
goto err_ndev;
}
self = netdev_priv(ndev);
self->pdev = pdev;
......
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