net: Return the correct errno code
authorZheng Yongjun <zhengyongjun3@huawei.com>
Wed, 2 Jun 2021 14:06:40 +0000 (22:06 +0800)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:49:12 +0000 (08:49 -0400)
commitadfe915905ba0737175ccf2e05598afdd6dfbf27
tree1f1d0c3f5dca6cfa87c62d5a476ef460b6ff7455
parente7a5c17a9eae28c502f98de7dbc8d01730c777d4
net: Return the correct errno code

[ Upstream commit 49251cd00228a3c983651f6bb2f33f6a0b8f152e ]

When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/compat.c