summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2016-10-26 12:03:03 +0300
committerDavid S. Miller <davem@davemloft.net>2016-10-29 14:58:33 -0400
commitc778453b138889587eee23e246e231bb12d1e80d (patch)
treefb435f8d68e328d2e0a46a468aebc5f8c89260ae /net
parentb15ca182ed136087f6a2cb9ffe880c923f36a56e (diff)
downloadlinux-stable-c778453b138889587eee23e246e231bb12d1e80d.tar.gz
linux-stable-c778453b138889587eee23e246e231bb12d1e80d.tar.bz2
linux-stable-c778453b138889587eee23e246e231bb12d1e80d.zip
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>
Diffstat (limited to 'net')
-rw-r--r--net/switchdev/switchdev.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 02beb35f577f..6f145b592a53 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -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);