[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <YNHOz8Aqo7Y1ZwO+@mwanda>
Date: Tue, 22 Jun 2021 14:51:43 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Giuseppe Cavallaro <peppe.cavallaro@...com>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Qing Zhang <zhangqing@...ngson.cn>,
Jiaxun Yang <jiaxun.yang@...goat.com>, netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH net-next] stmmac: dwmac-loongson: fix uninitialized variable
in loongson_dwmac_probe()
The "mdio" variable is never set to false. Also it should be a bool
type instead of int.
Fixes: 30bba69d7db4 ("stmmac: pci: Add dwmac support for Loongson")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
index 8cd4e2e8ec40..e108b0d2bd28 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
@@ -49,7 +49,8 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id
{
struct plat_stmmacenet_data *plat;
struct stmmac_resources res;
- int ret, i, mdio;
+ bool mdio = false;
+ int ret, i;
struct device_node *np;
np = dev_of_node(&pdev->dev);
--
2.30.2
Powered by blists - more mailing lists