aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim
diff options
context:
space:
mode:
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>2021-03-11 15:11:01 +0800
committerDavid S. Miller <davem@davemloft.net>2021-03-11 14:32:48 -0800
commitc53d21af674adf9c4ba7b65d29fa4a37a9f19e8f (patch)
treea665d4661c2cdf96ed721999d040244e2e7b16f6 /drivers/net/netdevsim
parentnet: phy: Expose phydev::dev_flags through sysfs (diff)
downloadlinux-dev-c53d21af674adf9c4ba7b65d29fa4a37a9f19e8f.tar.xz
linux-dev-c53d21af674adf9c4ba7b65d29fa4a37a9f19e8f.zip
netdevsim: fib: Remove redundant code
Fix the following coccicheck warnings: ./drivers/net/netdevsim/fib.c:874:5-8: Unneeded variable: "err". Return "0" on line 889. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim')
-rw-r--r--drivers/net/netdevsim/fib.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib.c
index 46fb414f7ca6..3ca0f54d0c3b 100644
--- a/drivers/net/netdevsim/fib.c
+++ b/drivers/net/netdevsim/fib.c
@@ -869,10 +869,8 @@ err_rt_offload_failed_flag_set:
return err;
}
-static int nsim_fib_event(struct nsim_fib_event *fib_event)
+static void nsim_fib_event(struct nsim_fib_event *fib_event)
{
- int err = 0;
-
switch (fib_event->family) {
case AF_INET:
nsim_fib4_event(fib_event->data, &fib_event->fen_info,
@@ -885,8 +883,6 @@ static int nsim_fib_event(struct nsim_fib_event *fib_event)
nsim_fib6_event_fini(&fib_event->fib6_event);
break;
}
-
- return err;
}
static int nsim_fib4_prepare_event(struct fib_notifier_info *info,