From: Zheng Yongjun Date: Thu, 4 Feb 2021 07:28:20 +0000 (+0800) Subject: dccp: Return the correct errno code X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=247b557ee52a8f404d79d365ac6b2c94d7332381;p=linux.git dccp: Return the correct errno code When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20210204072820.17723-1-zhengyongjun3@huawei.com Signed-off-by: Jakub Kicinski --- diff --git a/net/dccp/feat.c b/net/dccp/feat.c index 305f568048320..54086bb05c42c 100644 --- a/net/dccp/feat.c +++ b/net/dccp/feat.c @@ -371,7 +371,7 @@ static int dccp_feat_clone_sp_val(dccp_feat_val *fval, u8 const *val, u8 len) fval->sp.vec = kmemdup(val, len, gfp_any()); if (fval->sp.vec == NULL) { fval->sp.len = 0; - return -ENOBUFS; + return -ENOMEM; } } return 0;