Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1535602 > unrolled thread

[PATCH 1/1] net: ethernet: qlogic: fix improper return value

Started byPan Bian <bianpan201604@163.com>
First post2016-12-04 07:20 +0100
Last post2016-12-04 07:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] net: ethernet: qlogic: fix improper return value Pan Bian <bianpan201604@163.com> - 2016-12-04 07:20 +0100

#1535602 — [PATCH 1/1] net: ethernet: qlogic: fix improper return value

FromPan Bian <bianpan201604@163.com>
Date2016-12-04 07:20 +0100
Subject[PATCH 1/1] net: ethernet: qlogic: fix improper return value
Message-ID<sKyjw-3Ap-3@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web