Skip to content

Commit

Permalink
dccp: Return the correct errno code
Browse files Browse the repository at this point in the history
When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.

Signed-off-by: Zheng Yongjun <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
Zheng Yongjun authored and kuba-moo committed Feb 6, 2021
1 parent 1697291 commit 247b557
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dccp/feat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 247b557

Please sign in to comment.