diff options
| author | Wei Yongjun <[email protected]> | 2021-03-05 03:49:31 +0000 |
|---|---|---|
| committer | Vinod Koul <[email protected]> | 2021-03-30 23:35:17 +0530 |
| commit | b976c987511e34a2e9b23545de912a121a9eded5 (patch) | |
| tree | 63583ffd22078cb67666029fc4f01c704069fd2a | |
| parent | 6cb17707aad869de163d7bf42c253caf501be4e2 (diff) | |
phy: ralink: phy-mt7621-pci: fix return value check in mt7621_pci_phy_probe()
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")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Reviewed-by: Sergio Paracuellos <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
| -rw-r--r-- | drivers/phy/ralink/phy-mt7621-pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/phy/ralink/phy-mt7621-pci.c b/drivers/phy/ralink/phy-mt7621-pci.c index 84ee2b5c2228..753cb5bab930 100644 --- a/drivers/phy/ralink/phy-mt7621-pci.c +++ b/drivers/phy/ralink/phy-mt7621-pci.c @@ -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); |