mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-22 20:30:58 +02: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:
committed by
Jakub Kicinski
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());
|
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;
|
||||||
|
Reference in New Issue
Block a user