diff mbox series

[linux-next,v2] drivers: vxlan: fix returnvar.cocci warning

Message ID 20220308134321.29862-1-guozhengkui@vivo.com (mailing list archive)
State Accepted
Commit e58bc864630f0eb5e7bff8ac3c2d5816591189de
Delegated to: Netdev Maintainers
Headers show
Series [linux-next,v2] drivers: vxlan: fix returnvar.cocci warning | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Guo Zhengkui March 8, 2022, 1:43 p.m. UTC
Fix the following coccicheck warning:

drivers/net/vxlan/vxlan_core.c:2995:5-8:
Unneeded variable: "ret". Return "0" on line 3004.

Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
---
 drivers/net/vxlan/vxlan_core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Roopa Prabhu March 8, 2022, 8:32 p.m. UTC | #1
On 3/8/22 05:43, Guo Zhengkui wrote:
> Fix the following coccicheck warning:
>
> drivers/net/vxlan/vxlan_core.c:2995:5-8:
> Unneeded variable: "ret". Return "0" on line 3004.
>
> Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
> Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
> ---

Acked-by: Roopa Prabhu <roopa@nvidia.com>

the patch prefix should be net-next

thanks for the fix
patchwork-bot+netdevbpf@kernel.org March 10, 2022, 3:50 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  8 Mar 2022 21:43:09 +0800 you wrote:
> Fix the following coccicheck warning:
> 
> drivers/net/vxlan/vxlan_core.c:2995:5-8:
> Unneeded variable: "ret". Return "0" on line 3004.
> 
> Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
> Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
> 
> [...]

Here is the summary with links:
  - [linux-next,v2] drivers: vxlan: fix returnvar.cocci warning
    https://git.kernel.org/netdev/net-next/c/e58bc864630f

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index b3cbd37c4b93..e06158a42823 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -2992,7 +2992,6 @@  static void vxlan_flush(struct vxlan_dev *vxlan, bool do_all)
 static int vxlan_stop(struct net_device *dev)
 {
 	struct vxlan_dev *vxlan = netdev_priv(dev);
-	int ret = 0;
 
 	vxlan_multicast_leave(vxlan);
 
@@ -3001,7 +3000,7 @@  static int vxlan_stop(struct net_device *dev)
 	vxlan_flush(vxlan, false);
 	vxlan_sock_release(vxlan);
 
-	return ret;
+	return 0;
 }
 
 /* Stub, nothing needs to be done. */