Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -210,8 +210,10 @@ static int aq_pci_probe(struct pci_dev *pdev,
		goto err_pci_func;
		goto err_pci_func;


	ndev = aq_ndev_alloc();
	ndev = aq_ndev_alloc();
	if (!ndev)
	if (!ndev) {
		err = -ENOMEM;
		goto err_ndev;
		goto err_ndev;
	}


	self = netdev_priv(ndev);
	self = netdev_priv(ndev);
	self->pdev = pdev;
	self->pdev = pdev;