Skip to contentSkip to conversation

bnx2x: fix an error code in bnx2x_nic_load()

PATCH Applied Dan Carpenter 2 participants 2 messages Aug 5, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bnx2x: fix an error code in bnx2x_nic_load()

Set the error code if bnx2x_alloc_fw_stats_mem() fails. The current code returns success.

Fixes ad5afc89365e ("bnx2x: Separate VF and PF logic")
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +2 -1
index 1a6ec1a12d53..b5d954cb409a 100644
@@ -2669,7 +2669,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
 	}
 
 	/* Allocated memory for FW statistics  */
-	if (bnx2x_alloc_fw_stats_mem(bp))
+	rc = bnx2x_alloc_fw_stats_mem(bp);
+	if (rc)
 		LOAD_ERROR_EXIT(bp, load_error0);
 
 	/* request pf to initialize status blocks */
Signature · 1 line
2.20.1
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 8 lines · On Thu, 5 Aug 2021 13:38:26 +0300 you wrote:

Set the error code if bnx2x_alloc_fw_stats_mem() fails. The current code returns success.

Fixes ad5afc89365e ("bnx2x: Separate VF and PF logic")
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
- [net] bnx2x: fix an error code in bnx2x_nic_load()

    https://git.kernel.org/netdev/net/c/fb653827c758

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