net/x25: Return the correct errno code
authorZheng Yongjun <zhengyongjun3@huawei.com>
Wed, 2 Jun 2021 14:06:30 +0000 (22:06 +0800)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:48:13 +0000 (08:48 -0400)
commit1f61f0ee4a94c73e505b38f0ff045a0e7e19fa61
tree7aa92a974c55192993e1c3c66b070459d2f45df5
parent7e0147403ebae2fc60b1657114058d20e874a89a
net/x25: Return the correct errno code

[ Upstream commit d7736958668c4facc15f421e622ffd718f5be80a ]

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/x25/af_x25.c