Skip to content

Commit b976c98

Browse files
Wei Yongjunvinodkoul
authored andcommitted
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: d87da32 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210305034931.3237558-1-weiyongjun1@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 6cb1770 commit b976c98

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/phy/ralink/phy-mt7621-pci.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ static int mt7621_pci_phy_probe(struct platform_device *pdev)
319319
return PTR_ERR(phy->regmap);
320320

321321
phy->phy = devm_phy_create(dev, dev->of_node, &mt7621_pci_phy_ops);
322-
if (IS_ERR(phy)) {
322+
if (IS_ERR(phy->phy)) {
323323
dev_err(dev, "failed to create phy\n");
324-
return PTR_ERR(phy);
324+
return PTR_ERR(phy->phy);
325325
}
326326

327327
phy_set_drvdata(phy->phy, phy);

0 commit comments

Comments
 (0)