Skip to contentSkip to conversation

staging: mt7621-pci-phy: prevent use of uninitialized variable

PATCH In review Antti Keränen 2 participants 2 messages Apr 4, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: mt7621-pci-phy: prevent use of uninitialized variable

Do not use uninitialized variable 'port' when printing an error message

---
 drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c +1 -1
index 118302c122ee..aa3ae7777632 100644
@@ -331,7 +331,7 @@ static int mt7621_pci_phy_probe(struct platform_device *pdev)
 
 	ret = of_address_to_resource(np, 0, &res);
 	if (ret) {
-		dev_err(dev, "failed to get address resource(id-%d)\n", port);
+		dev_err(dev, "failed to get address resource\n");
 		return ret;
 	}
 
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Antti Keränen

Do not use uninitialized variable 'port' when printing an error message

---
 drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c +0 -0
index 118302c122ee..aa3ae7777632 100644

drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c static int mt7621_pci_phy_probe(struct platform_device *pdev) · line 336

Quoted 7 lines
drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c +1 -1
@@ -331,7 +331,7 @@ static int mt7621_pci_phy_probe(struct platform_device *pdev)
 
        ret = of_address_to_resource(np, 0, &res);
        if (ret) {
-               dev_err(dev, "failed to get address resource(id-%d)\n", port);
+               dev_err(dev, "failed to get address resource\n");
                return ret;
        }

Thanks,
Sergio Paracuellos

Quoted 4 lines
drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c +0 -1
--

2.21.0