Skip to contentSkip to conversation

xircom: remove redundant error check on variable err

PATCH Applied Colin King 2 participants 2 messages Apr 7, 2021

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 xircom: remove redundant error check on variable err

From: Colin Ian King <[email protected]>

The error check on err is always false as err is always 0 at the port_found label. The code is redundant and can be removed.

Addresses-Coverity: ("Logically dead code")

---
 drivers/net/ethernet/xircom/xirc2ps_cs.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/xircom/xirc2ps_cs.c +0 -2
index 3e337142b516..2049d76a0e68 100644
@@ -798,8 +798,6 @@ xirc2ps_config(struct pcmcia_device * link)
 	    goto config_error;
     }
   port_found:
-    if (err)
-	 goto config_error;
 
     /****************
      * Now allocate an interrupt line.	Note that this does not
Signature · 1 line
2.30.2
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

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

Quoted 9 lines · On Wed, 7 Apr 2021 10:39:22 +0100 you wrote:

From: Colin Ian King <[email protected]>

The error check on err is always false as err is always 0 at the port_found label. The code is redundant and can be removed.

Addresses-Coverity: ("Logically dead code")

[...]

Here is the summary with links:
- xircom: remove redundant error check on variable err

    https://git.kernel.org/netdev/net-next/c/7b3ae17f0f68

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