diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2021-02-04 10:28:20 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-02-06 22:15:28 +0300 |
commit | 247b557ee52a8f404d79d365ac6b2c94d7332381 (patch) | |
tree | d69fccb55c7caf3f57d52f404a9ab3a78ecbb068 /net | |
parent | 1697291dae7cc582d8f737d788991c01b27de90d (diff) | |
download | linux-247b557ee52a8f404d79d365ac6b2c94d7332381.tar.xz |
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')
-rw-r--r-- | net/dccp/feat.c | 2 |
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; |