aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan Zhen <[email protected]>2024-08-29 17:55:09 +0800
committerJakub Kicinski <[email protected]>2024-08-30 11:11:45 -0700
commitb26b64493343659cce8bbffa358bf39e4f68bdec (patch)
treee2d6278daefceea519188abab802af9e66eda7b0
parentf24f966feb62164f4a68d1b84e866504904ac4ac (diff)
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: Yan Zhen <[email protected]> Acked-by: Eelco Chaudron <[email protected]> Reviewed-by: Aaron Conole <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--net/openvswitch/flow_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index c92bdc4dfe19..729ef582a3a8 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -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;