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: Xu Wang <vulab@iscas.ac.cn> Link: https://lore.kernel.org/r/20210204070549.83636-1-vulab@iscas.ac.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Родитель
a8225efdf3
Коммит
1697291dae
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче