Skip to contentSkip to conversation

bnxt_en: Fix static checker warning in bnxt_fw_reset_task()

PATCH Applied Michael Chan 2 participants 2 messages Jul 26, 2021

Subsystems (3)
lore
Share & tools
lore

Michael Chan

author maintainer
#0 lore raw

PATCH 1/1 bnxt_en: Fix static checker warning in bnxt_fw_reset_task()

From: Somnath Kotur <[email protected]>

Now that we return when bnxt_open() fails in bnxt_fw_reset_task(), there is no need to check for 'rc' value again before invoking bnxt_reenable_sriov().

Fixes 3958b1da725a ("bnxt_en: fix error path of FW reset")
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -3
index 4db162cee911..89606587b156 100644
@@ -12131,9 +12131,8 @@ static void bnxt_fw_reset_task(struct work_struct *work)
 		/* Make sure fw_reset_state is 0 before clearing the flag */
 		smp_mb__before_atomic();
 		clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state);
-		bnxt_ulp_start(bp, rc);
-		if (!rc)
-			bnxt_reenable_sriov(bp);
+		bnxt_ulp_start(bp, 0);
+		bnxt_reenable_sriov(bp);
 		bnxt_vf_reps_alloc(bp);
 		bnxt_vf_reps_open(bp);
 		bnxt_dl_health_recovery_done(bp);
Signature · 1 line
2.18.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 6 lines · On Mon, 26 Jul 2021 14:52:48 -0400 you wrote:

From: Somnath Kotur <[email protected]>

Now that we return when bnxt_open() fails in bnxt_fw_reset_task(), there is no need to check for 'rc' value again before invoking bnxt_reenable_sriov().

Quoted 6 lines
Fixes 3958b1da725a ("bnxt_en: fix error path of FW reset")

[...]

Here is the summary with links:
- [net] bnxt_en: Fix static checker warning in bnxt_fw_reset_task()

    https://git.kernel.org/netdev/net/c/758684e49f4c

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