summaryrefslogtreecommitdiff
path: root/net/dccp
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2021-02-04 15:28:20 +0800
committerJakub Kicinski <kuba@kernel.org>2021-02-06 11:15:28 -0800
commit247b557ee52a8f404d79d365ac6b2c94d7332381 (patch)
treed69fccb55c7caf3f57d52f404a9ab3a78ecbb068 /net/dccp
parent1697291dae7cc582d8f737d788991c01b27de90d (diff)
dccp: Return the correct errno code
When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Link: https://lore.kernel.org/r/20210204072820.17723-1-zhengyongjun3@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/feat.c2
1 files changed, 1 insertions, 1 deletions
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;