Commit 247b557e authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Jakub Kicinski

dccp: Return the correct errno code

When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.
Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Link: https://lore.kernel.org/r/20210204072820.17723-1-zhengyongjun3@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1697291d
...@@ -371,7 +371,7 @@ static int dccp_feat_clone_sp_val(dccp_feat_val *fval, u8 const *val, u8 len) ...@@ -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()); fval->sp.vec = kmemdup(val, len, gfp_any());
if (fval->sp.vec == NULL) { if (fval->sp.vec == NULL) {
fval->sp.len = 0; fval->sp.len = 0;
return -ENOBUFS; return -ENOMEM;
} }
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment