Re: [PATCH net-next v3] net: assign err to 0 at begin in do_setlink() function

2017-11-18 Thread yuan linyu
On 五, 2017-11-17 at 15:08 +0900, David Miller wrote: > From: yuan linyu > Date: Thu, 16 Nov 2017 19:59:48 +0800 > > > From: yuan linyu > >  > > each netlink attribute have proper process when error happen, > > when exit one attribute process, it implies that no error, > > so err = 0; is useless.

Re: [PATCH net-next v3] net: assign err to 0 at begin in do_setlink() function

2017-11-16 Thread David Miller
From: yuan linyu Date: Thu, 16 Nov 2017 19:59:48 +0800 > From: yuan linyu > > each netlink attribute have proper process when error happen, > when exit one attribute process, it implies that no error, > so err = 0; is useless. > > assign err = 0; at beginning if all attributes not set. > > v1

[PATCH net-next v3] net: assign err to 0 at begin in do_setlink() function

2017-11-16 Thread yuan linyu
From: yuan linyu each netlink attribute have proper process when error happen, when exit one attribute process, it implies that no error, so err = 0; is useless. assign err = 0; at beginning if all attributes not set. v1 -> v2: fix review comment from David, clear err before nla