Skip to content

Commit c778453

Browse files
idoschdavem330
authored andcommitted
switchdev: Remove redundant variable
Instead of storing return value in 'err' and returning, just return directly. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b15ca18 commit c778453

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

net/switchdev/switchdev.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -624,13 +624,10 @@ EXPORT_SYMBOL_GPL(unregister_switchdev_notifier);
624624
int call_switchdev_notifiers(unsigned long val, struct net_device *dev,
625625
struct switchdev_notifier_info *info)
626626
{
627-
int err;
628-
629627
ASSERT_RTNL();
630628

631629
info->dev = dev;
632-
err = raw_notifier_call_chain(&switchdev_notif_chain, val, info);
633-
return err;
630+
return raw_notifier_call_chain(&switchdev_notif_chain, val, info);
634631
}
635632
EXPORT_SYMBOL_GPL(call_switchdev_notifiers);
636633

0 commit comments

Comments
 (0)