]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net: dcb: set error code on failures
authorPan Bian <bianpan2016@163.com>
Sat, 3 Dec 2016 13:49:08 +0000 (21:49 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Dec 2016 04:54:25 +0000 (23:54 -0500)
commitc66ebf2db555c6ed705044eabd2b37dcd546f68b
treebcc603ed251cdf86642b9441b4658fa93f4d9b50
parenta38b61009425b3882704270e792a6e743f5d9426
net: dcb: set error code on failures

In function dcbnl_cee_fill(), returns the value of variable err on
errors. However, on some error paths (e.g. nla put fails), its value may
be 0. It may be better to explicitly set a negative errno to variable
err before returning.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188881

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dcb/dcbnl.c