[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170104100901.GF3009@templeofstupid.com>
Date: Wed, 4 Jan 2017 02:09:01 -0800
From: Krister Johansen <kjlx@...pleofstupid.com>
To: Aaron Conole <aconole@...hat.com>
Cc: David Miller <davem@...emloft.net>, kjlx@...pleofstupid.com,
maheshb@...gle.com, netdev@...r.kernel.org
Subject: Re: [PATCH] Ipvlan should return an error when an address is already
in use.
On Tue, Jan 03, 2017 at 02:24:43PM -0500, Aaron Conole wrote:
> David Miller <davem@...emloft.net> writes:
>
> > From: Aaron Conole <aconole@...hat.com>
> > Date: Tue, 03 Jan 2017 10:50:00 -0500
> >
> >>> @@ -489,7 +490,12 @@ static int __inet_insert_ifa(struct in_ifaddr *ifa, struct nlmsghdr *nlh,
> >>> Notifier will trigger FIB update, so that
> >>> listeners of netlink will know about new ifaddr */
> >>> rtmsg_ifa(RTM_NEWADDR, ifa, nlh, portid);
> >>> - blocking_notifier_call_chain(&inetaddr_chain, NETDEV_UP, ifa);
> >>> + ret = blocking_notifier_call_chain(&inetaddr_chain, NETDEV_UP, ifa);
> >>
> >> Why are you doing this assignment if you aren't using the result?
> >>
> >>> + ret = notifier_to_errno(ret);
> >>> + if (ret) {
> >>> + __inet_del_ifa(in_dev, ifap, 1, NULL, portid);
> >>> + return ret;
> >>> + }
> >
> > 'ret' assignment is being used, via notifier_to_errno().
>
> d'oh! should have had more coffee - sorry for the noise.
No worries, and thanks for taking a look. That was from checkpatch,
which complained when I wrote it as:
if ((ret = notifier_to_errno(ret)) != 0) {
-K
Powered by blists - more mailing lists