summaryrefslogtreecommitdiffstats
path: root/net/x25
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2021-06-02 22:06:30 +0800
committerDavid S. Miller <davem@davemloft.net>2021-06-03 15:13:56 -0700
commitd7736958668c4facc15f421e622ffd718f5be80a (patch)
tree8e8421d34921a4d1749e3d7b899ac7c154bb7e77 /net/x25
parenta27fb314cba8cb84cd6456a4699c3330a83c326d (diff)
downloadlinux-d7736958668c4facc15f421e622ffd718f5be80a.tar.gz
linux-d7736958668c4facc15f421e622ffd718f5be80a.tar.bz2
linux-d7736958668c4facc15f421e622ffd718f5be80a.zip
net/x25: Return the correct errno code
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>
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 44d6566dd23e..1816899499ce 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -536,7 +536,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;