[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1471301464-24748-1-git-send-email-weiyj.lk@gmail.com>
Date: Mon, 15 Aug 2016 22:51:04 +0000
From: Wei Yongjun <weiyj.lk@...il.com>
To: Netanel Belgazal <netanel@...apurnalabs.com>,
Saeed Bishara <saeed@...apurnalabs.com>,
Zorik Machulsky <zorik@...apurnalabs.com>,
"David S. Miller" <davem@...emloft.net>
Cc: Wei Yongjun <weiyj.lk@...il.com>, netdev@...r.kernel.org
Subject: [PATCH -next] 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@...il.com>
---
drivers/net/ethernet/amazon/ena/ena_netdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 94790df..4cbe014 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;
}
Powered by blists - more mailing lists