summaryrefslogtreecommitdiff
path: root/net/x25
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2021-06-02 22:06:30 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-18 10:00:06 +0200
commit04c1556bfc79734ae91af632aff2f754a501c36c (patch)
tree760c387e0de4fe897bcca9968d773f5d622bf552 /net/x25
parent0aa356950800e18a96c78633cadaf1d1c6c33d7d (diff)
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>
Diffstat (limited to 'net/x25')
-rw-r--r--net/x25/af_x25.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index e65a50192432..03ed170b8125 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -546,7 +546,7 @@ static int x25_create(struct net *net, struct socket *sock, int protocol,
if (protocol)
goto out;
- rc = -ENOBUFS;
+ rc = -ENOMEM;
if ((sk = x25_alloc_socket(net, kern)) == NULL)
goto out;