diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-01-23 02:10:46 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-23 10:59:29 -0500 |
commit | f03e4f8aadc84deb8f3dddcbf0032bac75051e7a (patch) | |
tree | d812cf5ef578ca84bea0dbea7258e24c4379e89e /drivers/net/ethernet/aquantia | |
parent | e58decc9c51eb61697aba35ba8eda33f4b80552d (diff) | |
download | blackbird-obmc-linux-f03e4f8aadc84deb8f3dddcbf0032bac75051e7a.tar.gz blackbird-obmc-linux-f03e4f8aadc84deb8f3dddcbf0032bac75051e7a.zip |
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: 23ee07ad3c2f ("net: aquantia: Cleanup pci functions module")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia')
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c index f5dd5f75a40f..5cf3542a7e86 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c @@ -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; |