[PATCH] qed: Fix missing error code in qed_slowpath_start()

Subsystems: networking drivers, qlogic ql4xxx ethernet driver, the rest

STALE1793d

3 messages, 3 authors, 2021-10-11 · open the first message on its own page

[PATCH] qed: Fix missing error code in qed_slowpath_start()

From: Jiapeng Chong <hidden>
Date: 2021-10-09 08:14:59

From: chongjiapeng <redacted>

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'rc'.

Eliminate the follow smatch warning:

drivers/net/ethernet/qlogic/qed/qed_main.c:1298 qed_slowpath_start()
warn: missing error code 'rc'.

Reported-by: Abaci Robot <redacted>
Fixes: d51e4af5c209 ("qed: aRFS infrastructure support")
Signed-off-by: chongjiapeng <redacted>
---
 drivers/net/ethernet/qlogic/qed/qed_main.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 5e7242304ee2..359ad859ae18 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -1295,6 +1295,7 @@ static int qed_slowpath_start(struct qed_dev *cdev,
 			} else {
 				DP_NOTICE(cdev,
 					  "Failed to acquire PTT for aRFS\n");
+				rc = -EINVAL;
 				goto err;
 			}
 		}
-- 
2.19.1.6.gb485710b

Re: [PATCH] qed: Fix missing error code in qed_slowpath_start()

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-10-09 12:50:17

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller [off-list ref]:

On Sat,  9 Oct 2021 16:09:26 +0800 you wrote:
From: chongjiapeng <redacted>

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'rc'.

Eliminate the follow smatch warning:

[...]
Here is the summary with links:
  - qed: Fix missing error code in qed_slowpath_start()
    https://git.kernel.org/netdev/net/c/a5a14ea7b4e5

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

RE: [EXT] [PATCH] qed: Fix missing error code in qed_slowpath_start()

From: Alok Prasad <hidden>
Date: 2021-10-11 05:18:10

quoted hunk
-----Original Message-----
From: Jiapeng Chong <redacted>
Sent: 09 October 2021 13:39
To: Ariel Elior <redacted>
Cc: GR-everest-linux-l2 <redacted>; davem@davemloft.net;
kuba@kernel.org; linux@armlinux.org.uk; ast@kernel.org; daniel@iogearbox.net;
hawk@kernel.org; john.fastabend@gmail.com; netdev@vger.kernel.org; linux-
kernel@vger.kernel.org; bpf@vger.kernel.org; chongjiapeng
[off-list ref]
Subject: [EXT] [PATCH] qed: Fix missing error code in qed_slowpath_start()

External Email

----------------------------------------------------------------------
From: chongjiapeng <redacted>

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'rc'.

Eliminate the follow smatch warning:

drivers/net/ethernet/qlogic/qed/qed_main.c:1298 qed_slowpath_start()
warn: missing error code 'rc'.

Reported-by: Abaci Robot <redacted>
Fixes: d51e4af5c209 ("qed: aRFS infrastructure support")
Signed-off-by: chongjiapeng <redacted>
---
 drivers/net/ethernet/qlogic/qed/qed_main.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c
b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 5e7242304ee2..359ad859ae18 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -1295,6 +1295,7 @@ static int qed_slowpath_start(struct qed_dev *cdev,
 			} else {
 				DP_NOTICE(cdev,
 					  "Failed to acquire PTT for aRFS\n");
+				rc = -EINVAL;
 				goto err;
 			}
 		}
--
2.19.1.6.gb485710b
Thanks!

Acked-by: Alok Prasad <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help