Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] igc: remove unreachable break after return in XDP path
@ 2026-09-02  9:34 Keshav Goyal
  2026-09-03 10:22 ` Loktionov, Aleksandr
  0 siblings, 1 reply; 2+ messages in thread
From: Keshav Goyal @ 2026-09-02  9:34 UTC (permalink / raw)
  To: anthony.l.nguyen, przemyslaw.kitszel
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, intel-wired-lan,
	netdev, linux-kernel, Keshav Goyal

The break statement after "return IGC_XDP_REDIRECT" in the XDP
switch case is dead code since the return exits the function
unconditionally. All other return statements in this switch are
not followed by a break.

This was flagged by checkpatch.pl:
WARNING: break is not useful after a return

Signed-off-by: Keshav Goyal <keshav74123@gmail.com>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 1fb5f3cbe93c..3b7dd104d8d9 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -2525,7 +2525,6 @@ static int __igc_xdp_run_prog(struct igc_adapter *adapter,
 		if (xdp_do_redirect(adapter->netdev, xdp, prog) < 0)
 			goto out_failure;
 		return IGC_XDP_REDIRECT;
-		break;
 	default:
 		bpf_warn_invalid_xdp_action(adapter->netdev, prog, act);
 		fallthrough;
-- 
2.55.0


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

end of thread, other threads:[~2026-09-03 10:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02  9:34 [PATCH net-next] igc: remove unreachable break after return in XDP path Keshav Goyal
2026-09-03 10:22 ` Loktionov, Aleksandr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox