diff options
author | Zheng Yongjun | 2021-06-01 22:14:07 +0800 |
---|---|---|
committer | David S. Miller | 2021-06-01 17:02:15 -0700 |
commit | ca746c55a7e6e597cc2d29a094082d345b2c33c9 (patch) | |
tree | 8f1ad7915ad4efc304b5602597d61bb0f856744d /net/ipv4 | |
parent | b923cda9638860d6fbb688cfc4c939ff13df31b5 (diff) |
net: 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/ipv4')
-rw-r--r-- | net/ipv4/af_inet.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |