From: Wei Yongjun <weiyj.lk@gmail.com>
To: Netanel Belgazal <netanel@annapurnalabs.com>,
Saeed Bishara <saeed@annapurnalabs.com>,
Zorik Machulsky <zorik@annapurnalabs.com>,
"David S. Miller" <davem@davemloft.net>
Cc: Wei Yongjun <weiyj.lk@gmail.com>, netdev@vger.kernel.org
Subject: [PATCH -next] net: ena: Fix error return code in ena_device_init()
Date: Mon, 15 Aug 2016 22:51:04 +0000 [thread overview]
Message-ID: <1471301464-24748-1-git-send-email-weiyj.lk@gmail.com> (raw)
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>
---
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;
}
next reply other threads:[~2016-08-15 22:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-15 22:51 Wei Yongjun [this message]
2016-08-15 23:34 ` [PATCH -next] net: ena: Fix error return code in ena_device_init() David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1471301464-24748-1-git-send-email-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--cc=davem@davemloft.net \
--cc=netanel@annapurnalabs.com \
--cc=netdev@vger.kernel.org \
--cc=saeed@annapurnalabs.com \
--cc=zorik@annapurnalabs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).