Skip to content

Commit

Permalink
net: ena: Fix error return code in ena_device_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Aug 15, 2016
1 parent 557bc7d commit 6e22066
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/amazon/ena/ena_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6e22066

Please sign in to comment.