Skip to contentSkip to conversation

phy: ralink: phy-mt7621-pci: fix return value check in mt7621_pci_phy_probe()

PATCH Applied 'Wei Yongjun 3 participants 3 messages Mar 5, 2021 – Mar 15, 2021

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

PATCH 1/1 phy: ralink: phy-mt7621-pci: fix return value check in mt7621_pci_phy_probe()

From: Wei Yongjun <[email protected]>

Fix the return value check which testing the wrong variable in mt7621_pci_phy_probe().

Fixes d87da32372a0 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY")
---
 drivers/phy/ralink/phy-mt7621-pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/ralink/phy-mt7621-pci.c +2 -2
index 84ee2b5c2228..753cb5bab930 100644
@@ -319,9 +319,9 @@ static int mt7621_pci_phy_probe(struct platform_device *pdev)
 		return PTR_ERR(phy->regmap);
 
 	phy->phy = devm_phy_create(dev, dev->of_node, &mt7621_pci_phy_ops);
-	if (IS_ERR(phy)) {
+	if (IS_ERR(phy->phy)) {
 		dev_err(dev, "failed to create phy\n");
-		return PTR_ERR(phy);
+		return PTR_ERR(phy->phy);
 	}
 
 	phy_set_drvdata(phy->phy, phy);
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Fix the return value check which testing the wrong variable in mt7621_pci_phy_probe().

Quoted 6 lines
Fixes d87da32372a0 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY")
---
 drivers/phy/ralink/phy-mt7621-pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)