Skip to content

Commit

Permalink
stmmac: dwmac-loongson: fix uninitialized variable in loongson_dwmac_…
Browse files Browse the repository at this point in the history
…probe()

The "mdio" variable is never set to false.  Also it should be a bool
type instead of int.

Fixes: 30bba69 ("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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jun 22, 2021
1 parent a4bdf76 commit b0e0395
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b0e0395

Please sign in to comment.