switchdev: Remove redundant variable
authorIdo Schimmel <idosch@mellanox.com>
Wed, 26 Oct 2016 09:03:03 +0000 (12:03 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Oct 2016 18:58:33 +0000 (14:58 -0400)
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>
net/switchdev/switchdev.c

index 02beb35f577fca17e8989c7b63699a62bef8797d..6f145b592a536296c233643037b5c97710e59e76 100644 (file)
@@ -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);