]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/decnet/dn_dev.c
Pull apm-freeze-fix into release branch
[linux-2.6-omap-h63xx.git] / net / decnet / dn_dev.c
index 66e266fb5908b4976448da87ddc74d509c25b10f..3bc82dc83b387d33f92d496d81383c9346296f9d 100644 (file)
@@ -651,16 +651,18 @@ static int dn_nl_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
        struct dn_dev *dn_db;
        struct ifaddrmsg *ifm;
        struct dn_ifaddr *ifa, **ifap;
-       int err = -EADDRNOTAVAIL;
+       int err;
 
        err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, dn_ifa_policy);
        if (err < 0)
                goto errout;
 
+       err = -ENODEV;
        ifm = nlmsg_data(nlh);
        if ((dn_db = dn_dev_by_index(ifm->ifa_index)) == NULL)
                goto errout;
 
+       err = -EADDRNOTAVAIL;
        for (ifap = &dn_db->ifa_list; (ifa = *ifap); ifap = &ifa->ifa_next) {
                if (tb[IFA_LOCAL] &&
                    nla_memcmp(tb[IFA_LOCAL], &ifa->ifa_local, 2))