From 247b557ee52a8f404d79d365ac6b2c94d7332381 Mon Sep 17 00:00:00 2001 From: Zheng Yongjun Date: Thu, 4 Feb 2021 15:28:20 +0800 Subject: 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 --- net/dccp/feat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/dccp') diff --git a/net/dccp/feat.c b/net/dccp/feat.c index 305f56804832..54086bb05c42 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; -- cgit