diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-06-22 14:51:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-22 20:44:50 +0300 |
commit | b0e03950dd71315204c24a3dffb2d9fc477e82de (patch) | |
tree | a534baf4292668732f426ea8fad7d02cadad98b9 /drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | |
parent | a4bdf76f54e142a5d54189f2c81b69095bf347ff (diff) | |
download | linux-b0e03950dd71315204c24a3dffb2d9fc477e82de.tar.xz |
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@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |