Skip to content

Commit

Permalink
net: bridge: mcast: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
Browse files Browse the repository at this point in the history
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)).

net/bridge/br_multicast.c:1246:9-16: WARNING: ERR_CAST can be used with mp
Generated by: scripts/coccinelle/api/err_cast.cocci

Signed-off-by: Xu Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
ISCAS-Vulab authored and kuba-moo committed Feb 6, 2021
1 parent a8225ef commit 1697291
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ __br_multicast_add_group(struct net_bridge *br,

mp = br_multicast_new_group(br, group);
if (IS_ERR(mp))
return ERR_PTR(PTR_ERR(mp));
return ERR_CAST(mp);

if (!port) {
br_multicast_host_join(mp, true);
Expand Down

0 comments on commit 1697291

Please sign in to comment.