summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amazon/ena/ena_netdev.c
diff options
context:
space:
mode:
authorWei Yongjun2016-08-16 00:51:04 +0200
committerDavid S. Miller2016-08-16 01:16:11 +0200
commit6e22066fd02b675260b980b3e42b7d616a9839c5 (patch)
tree513ce65b81f7266748641a84489d46197f3a4e69 /drivers/net/ethernet/amazon/ena/ena_netdev.c
parentnet: ena: Remove unnecessary pci_set_drvdata() (diff)
downloadkernel-qcow2-linux-6e22066fd02b675260b980b3e42b7d616a9839c5.tar.gz
kernel-qcow2-linux-6e22066fd02b675260b980b3e42b7d616a9839c5.tar.xz
kernel-qcow2-linux-6e22066fd02b675260b980b3e42b7d616a9839c5.zip
net: ena: Fix error return code in ena_device_init()
Fix to return a negative error code from the invalid dma width error handling case instead of 0. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amazon/ena/ena_netdev.c')
-rw-r--r--drivers/net/ethernet/amazon/ena/ena_netdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 499a22b165f1..5c536b8ec99c 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -2329,6 +2329,7 @@ static int ena_device_init(struct ena_com_dev *ena_dev, struct pci_dev *pdev,
dma_width = ena_com_get_dma_width(ena_dev);
if (dma_width < 0) {
dev_err(dev, "Invalid dma width value %d", dma_width);
+ rc = dma_width;
goto err_mmio_read_less;
}