Commit b26b6449 authored by Yan Zhen's avatar Yan Zhen Committed by Jakub Kicinski

net: openvswitch: Use ERR_CAST() to return

Using ERR_CAST() is more reasonable and safer, When it is necessary
to convert the type of an error pointer and return it.
Signed-off-by: default avatarYan Zhen <yanzhen@vivo.com>
Acked-by: default avatarEelco Chaudron <echaudro@redhat.com>
Reviewed-by: default avatarAaron Conole <aconole@redhat.com>
Link: https://patch.msgid.link/20240829095509.3151987-1-yanzhen@vivo.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f24f966f
......@@ -2491,7 +2491,7 @@ static struct nlattr *reserve_sfa_size(struct sw_flow_actions **sfa,
acts = nla_alloc_flow_actions(new_acts_size);
if (IS_ERR(acts))
return (void *)acts;
return ERR_CAST(acts);
memcpy(acts->actions, (*sfa)->actions, (*sfa)->actions_len);
acts->actions_len = (*sfa)->actions_len;
......
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