Phonet: remove tautologies
authorRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Mon, 2 Nov 2009 22:41:28 +0000 (22:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Nov 2009 13:06:24 +0000 (05:06 -0800)
These checks don't make sense anymore since rtnl_notify() cannot fail.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/phonet/pn_netlink.c

index d8f5d3fb9ee24dd267ae92b23f7b7da583c6e5b5..609e509b369bc35e94b0e25f2a89444945fe33ee 100644 (file)
@@ -53,8 +53,7 @@ void phonet_address_notify(int event, struct net_device *dev, u8 addr)
                    RTNLGRP_PHONET_IFADDR, NULL, GFP_KERNEL);
        return;
 errout:
-       if (err < 0)
-               rtnl_set_sk_err(dev_net(dev), RTNLGRP_PHONET_IFADDR, err);
+       rtnl_set_sk_err(dev_net(dev), RTNLGRP_PHONET_IFADDR, err);
 }
 
 static const struct nla_policy ifa_phonet_policy[IFA_MAX+1] = {
@@ -212,8 +211,7 @@ void rtm_phonet_notify(int event, struct net_device *dev, u8 dst)
                          RTNLGRP_PHONET_ROUTE, NULL, GFP_KERNEL);
        return;
 errout:
-       if (err < 0)
-               rtnl_set_sk_err(dev_net(dev), RTNLGRP_PHONET_ROUTE, err);
+       rtnl_set_sk_err(dev_net(dev), RTNLGRP_PHONET_ROUTE, err);
 }
 
 static const struct nla_policy rtm_phonet_policy[RTA_MAX+1] = {