> -----Original Message-----
> From: Keshav Goyal <[email protected]>
> Sent: Wednesday, September 2, 2026 11:35 AM
> To: Nguyen, Anthony L <[email protected]>; Kitszel,
> Przemyslaw <[email protected]>
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; Keshav Goyal
> <[email protected]>
> Subject: [PATCH net-next] igc: remove unreachable break after return
> in XDP path
> 
> 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 <[email protected]>
> ---
>  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

Reviewed-by: Aleksandr Loktionov <[email protected]>

Reply via email to