linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dsa: mv88e6xxx: fix returnvar.cocci warnings
@ 2017-05-27  4:38 Julia Lawall
  2017-05-27 14:51 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2017-05-27  4:38 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: netdev, Vivien Didelot, Florian Fainelli, netdev, linux-kernel,
	kbuild-all

Remove unneeded variable used to store return value.

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

CC: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

It's a minor issue, but since there is no error, the code is a bit
misleading.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
master
head:   47936d35edbac5e58064bd15e51136050b2f2717
commit: 04aca9938255fc7097b3fb5700f408524656f2e2 [330/362] dsa: mv88e6xxx:
Enable/Disable SERDES on port enable/disable

 chip.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -1982,13 +1982,12 @@ static int mv88e6xxx_port_enable(struct
 				 struct phy_device *phydev)
 {
 	struct mv88e6xxx_chip *chip = ds->priv;
-	int err = 0;

 	mutex_lock(&chip->reg_lock);
 	mv88e6xxx_serdes_power(chip, port, true);
 	mutex_unlock(&chip->reg_lock);

-	return err;
+	return 0;
 }

 static void mv88e6xxx_port_disable(struct dsa_switch *ds, int port,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-27 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-27  4:38 [PATCH] dsa: mv88e6xxx: fix returnvar.cocci warnings Julia Lawall
2017-05-27 14:51 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).