Skip to content

Commit

Permalink
switchdev: Remove redundant variable
Browse files Browse the repository at this point in the history
Instead of storing return value in 'err' and returning, just return
directly.

Signed-off-by: Ido Schimmel <[email protected]>
Reviewed-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
idosch authored and davem330 committed Oct 29, 2016
1 parent b15ca18 commit c778453
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/switchdev/switchdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,13 +624,10 @@ EXPORT_SYMBOL_GPL(unregister_switchdev_notifier);
int call_switchdev_notifiers(unsigned long val, struct net_device *dev,
struct switchdev_notifier_info *info)
{
int err;

ASSERT_RTNL();

info->dev = dev;
err = raw_notifier_call_chain(&switchdev_notif_chain, val, info);
return err;
return raw_notifier_call_chain(&switchdev_notif_chain, val, info);
}
EXPORT_SYMBOL_GPL(call_switchdev_notifiers);

Expand Down

0 comments on commit c778453

Please sign in to comment.