bridge: remove unnecessary condition judgment
authortanxiaojun <tanxiaojun@huawei.com>
Thu, 19 Dec 2013 05:28:10 +0000 (13:28 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Dec 2013 00:27:25 +0000 (19:27 -0500)
Because err is always negative, remove unnecessary condition
judgment.

Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_fdb.c
net/bridge/br_netlink.c

index 33e8f23acddd9ca2c817913753142ce063c1fb9e..c5f5a4a933f4302d34fd35abff160287af496919 100644 (file)
@@ -570,8 +570,7 @@ static void fdb_notify(struct net_bridge *br,
        rtnl_notify(skb, net, 0, RTNLGRP_NEIGH, NULL, GFP_ATOMIC);
        return;
 errout:
-       if (err < 0)
-               rtnl_set_sk_err(net, RTNLGRP_NEIGH, err);
+       rtnl_set_sk_err(net, RTNLGRP_NEIGH, err);
 }
 
 /* Dump information about entries, in response to GETNEIGH */
index c2fd6bc5f08013325b25424e03bf684a56717897..6526ac89bbfa8f2ebf5532a55b662d4eb714b22e 100644 (file)
@@ -195,8 +195,7 @@ void br_ifinfo_notify(int event, struct net_bridge_port *port)
        rtnl_notify(skb, net, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC);
        return;
 errout:
-       if (err < 0)
-               rtnl_set_sk_err(net, RTNLGRP_LINK, err);
+       rtnl_set_sk_err(net, RTNLGRP_LINK, err);
 }