net: return correct error code
authorliuguoqiang <liuguoqiang@uniontech.com>
Mon, 15 Nov 2021 08:14:48 +0000 (16:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 08:04:38 +0000 (09:04 +0100)
commit00fdcc2b447417b5943665c552a742e708a067d5
tree281d0841c9a4707cb7d63f2a3a37519b84cdcb02
parentcec49b6dfdb0b9fefd0f17c32014223f73ee2605
net: return correct error code

[ Upstream commit 6def480181f15f6d9ec812bca8cbc62451ba314c ]

When kmemdup called failed and register_net_sysctl return NULL, should
return ENOMEM instead of ENOBUFS

Signed-off-by: liuguoqiang <liuguoqiang@uniontech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/devinet.c