[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211121145624.GA5334@yacov-PR601-VR603>
Date: Sun, 21 Nov 2021 17:02:53 +0200
From: Yacov Simhony <ysimhony@...il.com>
To: Nicolas Ferre <nicolas.ferre@...rochip.com>,
Claudiu Beznea <claudiu.beznea@...rochip.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...il.com>
---
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
Powered by blists - more mailing lists