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>
                goto err_pci_func;
 
        ndev = aq_ndev_alloc();
-       if (!ndev)
+       if (!ndev) {
+               err = -ENOMEM;
                goto err_ndev;
+       }
 
        self = netdev_priv(ndev);
        self->pdev = pdev;