summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorXu Wang <vulab@iscas.ac.cn>2021-02-04 07:05:49 +0000
committerJakub Kicinski <kuba@kernel.org>2021-02-06 10:51:01 -0800
commit1697291dae7cc582d8f737d788991c01b27de90d (patch)
treeca5ace1b94aacfd08c7978aaceeef58ecee47738 /net
parenta8225efdf31e9498c5696554e5731da893c93f61 (diff)
downloadlinux-1697291dae7cc582d8f737d788991c01b27de90d.tar.gz
linux-1697291dae7cc582d8f737d788991c01b27de90d.tar.bz2
linux-1697291dae7cc582d8f737d788991c01b27de90d.zip
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>
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_multicast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 6f672eb7ff33..bf10ef5bbcd9 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -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);