mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 13:51:44 +00:00
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>
This commit is contained in:
parent
1697291dae
commit
247b557ee5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user