diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c index 019bcc725715..a8a27c5e8aeb 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c @@ -202,12 +202,13 @@ struct aq_nic_s *aq_nic_alloc_cold(const struct net_device_ops *ndev_ops, int err = 0; ndev = aq_nic_ndev_alloc(); - self = netdev_priv(ndev); - if (!self) { - err = -EINVAL; + if (!ndev) { + err = -ENOMEM; goto err_exit; } + self = netdev_priv(ndev); + ndev->netdev_ops = ndev_ops; ndev->ethtool_ops = et_ops; |