net: propagate dev_get_valid_name return code
authorLi RongQing <lirongqing@baidu.com>
Tue, 19 Jun 2018 09:23:17 +0000 (17:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:09:02 +0000 (13:09 +0200)
commite0eaae3872840ab8b57457da9b2a82551136168d
tree19e1750815cc138df0fdf6391cbab2c39e95d96a
parent7c828ea375a19f84f3f1c0546adc05766102aa6f
net: propagate dev_get_valid_name return code

[ Upstream commit 7892bd081045222b9e4027fec279a28d6fe7aa66 ]

if dev_get_valid_name failed, propagate its return code

and remove the setting err to ENODEV, it will be set to
0 again before dev_change_net_namespace exits.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/dev.c