[net-next] net: dsa: b53: Uninitialized variable in b53_adjust_link()
diff mbox series

Message ID 20180908083925.i5j23wi67m5by2ew@kili.mountain
State Accepted, archived
Delegated to: David Miller
Headers show
Series
  • [net-next] net: dsa: b53: Uninitialized variable in b53_adjust_link()
Related show

Commit Message

Dan Carpenter Sept. 8, 2018, 8:39 a.m. UTC
The "pause" variable is only initialized on BCM5301x.

Fixes: 5e004460f874 ("net: dsa: b53: Add helper to set link parameters")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

David Miller Sept. 12, 2018, 6 a.m. UTC | #1
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Sat, 8 Sep 2018 11:39:25 +0300

> The "pause" variable is only initialized on BCM5301x.
> 
> Fixes: 5e004460f874 ("net: dsa: b53: Add helper to set link parameters")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks Dan.

Patch
diff mbox series

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index ea4256cd628b..dbf5b86a07fe 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1025,7 +1025,7 @@  static void b53_adjust_link(struct dsa_switch *ds, int port,
 	struct b53_device *dev = ds->priv;
 	struct ethtool_eee *p = &dev->ports[port].eee;
 	u8 rgmii_ctrl = 0, reg = 0, off;
-	int pause;
+	int pause = 0;
 
 	if (!phy_is_pseudo_fixed_link(phydev))
 		return;