From: Zheng Yongjun Date: Wed, 2 Jun 2021 14:06:30 +0000 (+0800) Subject: net/x25: Return the correct errno code X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d7736958668c4facc15f421e622ffd718f5be80a;p=linux.git net/x25: Return the correct errno code When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller --- diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 44d6566dd23e4..1816899499ce8 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;