From: Pan Bian <bianpan201604@163.com>
To: Harish Patil <harish.patil@cavium.com>,
Manish Chopra <manish.chopra@cavium.com>,
Dept-GELinuxNICDev@cavium.com, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Pan Bian <bianpan2016@163.com>
Subject: [PATCH 1/1] net: ethernet: qlogic: fix improper return value
Date: Sun, 4 Dec 2016 14:15:17 +0800 [thread overview]
Message-ID: <1480832117-5526-1-git-send-email-bianpan201604@163.com> (raw)
From: Pan Bian <bianpan2016@163.com>
When the call to qlcnic_alloc_mbx_args() fails, returning variable "err"
seems improper. With reference to the context, returing variable
"config" may be better.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189101
Signed-off-by: Pan Bian <bianpan2016@163.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index bdbcd2b..21c4aca 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -3189,7 +3189,7 @@ int qlcnic_83xx_test_link(struct qlcnic_adapter *adapter)
err = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_GET_LINK_STATUS);
if (err)
- return err;
+ return config;
err = qlcnic_issue_cmd(adapter, &cmd);
if (err) {
--
1.9.1
reply other threads:[~2016-12-04 6:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1480832117-5526-1-git-send-email-bianpan201604@163.com \
--to=bianpan201604@163.com \
--cc=Dept-GELinuxNICDev@cavium.com \
--cc=bianpan2016@163.com \
--cc=harish.patil@cavium.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manish.chopra@cavium.com \
--cc=netdev@vger.kernel.org \
/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).