Commit c53d21af authored by Jiapeng Chong's avatar Jiapeng Chong Committed by David S. Miller

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: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b0bade51
...@@ -869,10 +869,8 @@ static int nsim_fib6_event(struct nsim_fib_data *data, ...@@ -869,10 +869,8 @@ static int nsim_fib6_event(struct nsim_fib_data *data,
return err; 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) { switch (fib_event->family) {
case AF_INET: case AF_INET:
nsim_fib4_event(fib_event->data, &fib_event->fen_info, 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) ...@@ -885,8 +883,6 @@ static int nsim_fib_event(struct nsim_fib_event *fib_event)
nsim_fib6_event_fini(&fib_event->fib6_event); nsim_fib6_event_fini(&fib_event->fib6_event);
break; break;
} }
return err;
} }
static int nsim_fib4_prepare_event(struct fib_notifier_info *info, static int nsim_fib4_prepare_event(struct fib_notifier_info *info,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment