diff mbox series

vxlan: fix returnvar.cocci warnings

Message ID 20220321154456.GA30106@e0e7ddfdfbf7 (mailing list archive)
State New
Headers show
Series vxlan: fix returnvar.cocci warnings | expand

Commit Message

kernel test robot March 21, 2022, 3:44 p.m. UTC
From: kernel test robot <lkp@intel.com>

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


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
CC: Roopa Prabhu <roopa@nvidia.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   6d72dda014a4753974eb08950089ddf71fec4f60
commit: f9c4bb0b245cee35ef66f75bf409c9573d934cf9 [8808/13988] vxlan: vni filtering support on collect metadata device
:::::: branch date: 3 days ago
:::::: commit date: 3 weeks ago

 drivers/net/vxlan/vxlan_core.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jakub Kicinski March 21, 2022, 7:16 p.m. UTC | #1
On Mon, 21 Mar 2022 23:44:57 +0800 kernel test robot wrote:
> From: kernel test robot <lkp@intel.com>
> 
> drivers/net/vxlan/vxlan_core.c:2962:5-8: Unneeded variable: "ret". Return "0" on line 2971
> 
> 
>  Remove unneeded variable used to store return value.
> 
> Generated by: scripts/coccinelle/misc/returnvar.cocci
> 
> Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
> CC: Roopa Prabhu <roopa@nvidia.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>

Your tree is stale, this looks exactly like commit e58bc864630f
("drivers: vxlan: fix returnvar.cocci warning") merged on March 8th.
diff mbox series

Patch

--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -2959,7 +2959,6 @@  static void vxlan_flush(struct vxlan_dev
 static int vxlan_stop(struct net_device *dev)
 {
 	struct vxlan_dev *vxlan = netdev_priv(dev);
-	int ret = 0;
 
 	vxlan_multicast_leave(vxlan);
 
@@ -2968,7 +2967,7 @@  static int vxlan_stop(struct net_device
 	vxlan_flush(vxlan, false);
 	vxlan_sock_release(vxlan);
 
-	return ret;
+	return 0;
 }
 
 /* Stub, nothing needs to be done. */