From: Zheng Yongjun Date: Tue, 1 Jun 2021 14:14:07 +0000 (+0800) Subject: net: Return the correct errno code X-Git-Tag: howlett/maple/20220722_2~2864^2~381 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ca746c55a7e6e597cc2d29a094082d345b2c33c9;p=users%2Fjedix%2Flinux-maple.git net: 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/ipv4/af_inet.c b/net/ipv4/af_inet.c index d9bccad65e2b..750f388a4a68 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -318,7 +318,7 @@ lookup_protocol: WARN_ON(!answer_prot->slab); - err = -ENOBUFS; + err = -ENOMEM; sk = sk_alloc(net, PF_INET, GFP_KERNEL, answer_prot, kern); if (!sk) goto out;