[PATCH] Fix coverity issue 'Uninitialized scalar variable"
From: Yacov Simhony
Date: Sun Nov 21 2021 - 10:05:46 EST
There are three boolean variable which were not initialized and later
being used in the code.
Signed-off-by: Yacov Simhony <ysimhony@xxxxxxxxx>
---
drivers/net/ethernet/cadence/macb_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 57c5f48..d23c3f6 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) &&
--
2.7.4