mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
net: mana: remove unreachable dead code in mana_bpf()
mana_bpf() has a trailing 'return ret;' after a switch statement whose every case (XDP_SETUP_PROG and default) already returns unconditionally. The statement is therefore unreachable and 'ret' is never used. Remove both. No functional change intended. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Reviewed-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com> Link: https://patch.msgid.link/3d8b67307df6fefdc18743274cef3de4fca0e7de.1788339612.git.falakreyaz@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
f8ddbec9df
commit
8d5f1bda7e
|
|
@ -253,7 +253,6 @@ static int mana_xdp_set(struct net_device *ndev, struct bpf_prog *prog,
|
|||
int mana_bpf(struct net_device *ndev, struct netdev_bpf *bpf)
|
||||
{
|
||||
struct netlink_ext_ack *extack = bpf->extack;
|
||||
int ret;
|
||||
|
||||
switch (bpf->command) {
|
||||
case XDP_SETUP_PROG:
|
||||
|
|
@ -262,6 +261,4 @@ int mana_bpf(struct net_device *ndev, struct netdev_bpf *bpf)
|
|||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user