LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH][next] octeontx2-af: remove redudant second error check on variable err
@ 2021-08-18 13:09 Colin King
  2021-08-19 19:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-08-18 13:09 UTC (permalink / raw)
  To: Sunil Goutham, Linu Cherian, Geetha sowjanya, Jerin Jacob,
	Subbaraya Sundeep, David S . Miller, Jakub Kicinski, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

A recent change added error checking messages and failed to remove one
of the previous error checks. There are now two checks on variable err
so the second one is redundant dead code and can be removed.

Addresses-Coverity: ("Logically dead code")
Fixes: a83bdada06bf ("octeontx2-af: Add debug messages for failures")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index fb50df93b54e..c2438ba5e2ec 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -1031,8 +1031,6 @@ static int rvu_setup_hw_resources(struct rvu *rvu)
 			"%s: Failed to allocate CPT1 LF bitmap\n", __func__);
 		return err;
 	}
-	if (err)
-		return err;
 
 	/* Allocate memory for PFVF data */
 	rvu->pf = devm_kcalloc(rvu->dev, hw->total_pfs,
-- 
2.32.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][next] octeontx2-af: remove redudant second error check on variable err
  2021-08-18 13:09 [PATCH][next] octeontx2-af: remove redudant second error check on variable err Colin King
@ 2021-08-19 19:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-19 19:30 UTC (permalink / raw)
  To: Colin Ian King
  Cc: sgoutham, lcherian, gakula, jerinj, sbhatta, davem, kuba, netdev,
	kernel-janitors, linux-kernel

Hello:

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

On Wed, 18 Aug 2021 14:09:27 +0100 you wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> A recent change added error checking messages and failed to remove one
> of the previous error checks. There are now two checks on variable err
> so the second one is redundant dead code and can be removed.
> 
> Addresses-Coverity: ("Logically dead code")
> Fixes: a83bdada06bf ("octeontx2-af: Add debug messages for failures")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> 
> [...]

Here is the summary with links:
  - [next] octeontx2-af: remove redudant second error check on variable err
    https://git.kernel.org/netdev/net-next/c/9e5f10fe577b

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-19 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 13:09 [PATCH][next] octeontx2-af: remove redudant second error check on variable err Colin King
2021-08-19 19:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).