summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cadence/macb_main.c
diff options
context:
space:
mode:
authorYacov Simhony <ysimhony@gmail.com>2021-11-21 17:02:53 +0200
committerDavid S. Miller <davem@davemloft.net>2021-11-22 14:27:00 +0000
commitac9f66ff04a983974cb33dd207a5fcb3e5356d90 (patch)
tree2a55184ce097d4e96aece7129524083b60a585ae /drivers/net/ethernet/cadence/macb_main.c
parentbd4b827cec1d4eec7a916dc4da0ca65939f80f4b (diff)
downloadlinux-ac9f66ff04a983974cb33dd207a5fcb3e5356d90.tar.bz2
Fix coverity issue 'Uninitialized scalar variable"
There are three boolean variable which were not initialized and later being used in the code. Signed-off-by: Yacov Simhony <ysimhony@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence/macb_main.c')
-rw-r--r--drivers/net/ethernet/cadence/macb_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 7b68f5a1720c..2c10a3f1cdbb 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -513,7 +513,7 @@ static void macb_validate(struct phylink_config *config,
struct net_device *ndev = to_net_dev(config->dev);
__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
struct macb *bp = netdev_priv(ndev);
- bool have_1g, have_sgmii, have_10g;
+ bool have_1g=false, have_sgmii=false, have_10g=false;
/* Determine what modes are supported */
if (macb_is_gem(bp) &&