diff mbox series

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

Message ID 20210204070549.83636-1-vulab@iscas.ac.cn (mailing list archive)
State Accepted
Commit 1697291dae7cc582d8f737d788991c01b27de90d
Delegated to: Netdev Maintainers
Headers show
Series net: bridge: mcast: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Xu Wang Feb. 4, 2021, 7:05 a.m. UTC
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>
---
 net/bridge/br_multicast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 6, 2021, 7:20 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Thu,  4 Feb 2021 07:05:49 +0000 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - net: bridge: mcast: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
    https://git.kernel.org/netdev/net-next/c/1697291dae7c

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 257ac4e25f6d..dfbb4dd01fa9 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1243,7 +1243,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);