aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/decnet/dn_dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index 66e266fb5908..3bc82dc83b38 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -651,16 +651,18 @@ static int dn_nl_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
651 struct dn_dev *dn_db; 651 struct dn_dev *dn_db;
652 struct ifaddrmsg *ifm; 652 struct ifaddrmsg *ifm;
653 struct dn_ifaddr *ifa, **ifap; 653 struct dn_ifaddr *ifa, **ifap;
654 int err = -EADDRNOTAVAIL; 654 int err;
655 655
656 err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, dn_ifa_policy); 656 err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, dn_ifa_policy);
657 if (err < 0) 657 if (err < 0)
658 goto errout; 658 goto errout;
659 659
660 err = -ENODEV;
660 ifm = nlmsg_data(nlh); 661 ifm = nlmsg_data(nlh);
661 if ((dn_db = dn_dev_by_index(ifm->ifa_index)) == NULL) 662 if ((dn_db = dn_dev_by_index(ifm->ifa_index)) == NULL)
662 goto errout; 663 goto errout;
663 664
665 err = -EADDRNOTAVAIL;
664 for (ifap = &dn_db->ifa_list; (ifa = *ifap); ifap = &ifa->ifa_next) { 666 for (ifap = &dn_db->ifa_list; (ifa = *ifap); ifap = &ifa->ifa_next) {
665 if (tb[IFA_LOCAL] && 667 if (tb[IFA_LOCAL] &&
666 nla_memcmp(tb[IFA_LOCAL], &ifa->ifa_local, 2)) 668 nla_memcmp(tb[IFA_LOCAL], &ifa->ifa_local, 2))