Skip to contentSkip to conversation

Phonet: remove tautologies

PATCH Applied Rémi Denis-Courmont 2 participants 2 messages Nov 3, 2009 – Nov 4, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Phonet: remove tautologies

From: Rémi Denis-Courmont <[email protected]>

These checks don't make sense anymore since rtnl_notify() cannot fail.

---
 net/phonet/pn_netlink.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
net/phonet/pn_netlink.c +2 -4
index d8f5d3f..609e509 100644
@@ -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] = {
Signature · 1 line
1.6.3.3