Skip to content

Commit

Permalink
Phonet: remove tautologies
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rémi Denis-Courmont authored and davem330 committed Nov 4, 2009
1 parent df7641a commit 4b7673a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/phonet/pn_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down Expand Up @@ -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] = {
Expand Down

0 comments on commit 4b7673a

Please sign in to comment.