Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bridge: Use PTR_ERR_OR_ZERO instead if(IS_ERR(...)) + PTR_ERR

coccicheck suggested using PTR_ERR_OR_ZERO() and looking at the code.

Fix the following coccicheck warnings:

./net/bridge/br_multicast.c:1295:7-13: WARNING: PTR_ERR_OR_ZERO can be
used.

Reported-by: Abaci <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Link: https://lore.kernel.org/r/1611542381-91178-1-git-send-email-abaci-bugfix@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Jiapeng Zhong and committed by
Jakub Kicinski
8d21c882 b9b7421a

+1 -1
+1 -1
net/bridge/br_multicast.c
··· 1300 1300 pg = __br_multicast_add_group(br, port, group, src, filter_mode, 1301 1301 igmpv2_mldv1, false); 1302 1302 /* NULL is considered valid for host joined groups */ 1303 - err = IS_ERR(pg) ? PTR_ERR(pg) : 0; 1303 + err = PTR_ERR_OR_ZERO(pg); 1304 1304 spin_unlock(&br->multicast_lock); 1305 1305 1306 1306 return err;