Commit 1697291d authored by Xu Wang's avatar Xu Wang Committed by Jakub Kicinski

net: bridge: mcast: Use ERR_CAST instead of ERR_PTR(PTR_ERR())

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: default avatarXu Wang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20210204070549.83636-1-vulab@iscas.ac.cnSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent a8225efd
...@@ -1251,7 +1251,7 @@ __br_multicast_add_group(struct net_bridge *br, ...@@ -1251,7 +1251,7 @@ __br_multicast_add_group(struct net_bridge *br,
mp = br_multicast_new_group(br, group); mp = br_multicast_new_group(br, group);
if (IS_ERR(mp)) if (IS_ERR(mp))
return ERR_PTR(PTR_ERR(mp)); return ERR_CAST(mp);
if (!port) { if (!port) {
br_multicast_host_join(mp, true); br_multicast_host_join(mp, true);
......
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