diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2021-06-02 22:06:30 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-18 09:59:00 +0200 |
commit | 376a703f9dce51cf46e2d395fb0c86b4476fb666 (patch) | |
tree | 3c5b4456e2beea62ef8f61eed7b23b5b3545d988 | |
parent | 107140952ecdd1946d8e9fcbb8f185ffc0b9f836 (diff) | |
download | linux-stable-376a703f9dce51cf46e2d395fb0c86b4476fb666.tar.gz linux-stable-376a703f9dce51cf46e2d395fb0c86b4476fb666.tar.bz2 linux-stable-376a703f9dce51cf46e2d395fb0c86b4476fb666.zip |
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>
-rw-r--r-- | net/x25/af_x25.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index cb1f5016c433..d8d603aa4887 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; |