Skip to content

Commit 5289de5

Browse files
zhaoxiaodavem330
authored andcommitted
stmmac: dwmac-loongson:Fix missing return value
Add the return value when phy_mode < 0. Signed-off-by: zhaoxiao <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 48eab83 commit 5289de5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id
109109
plat->bus_id = pci_dev_id(pdev);
110110

111111
phy_mode = device_get_phy_mode(&pdev->dev);
112-
if (phy_mode < 0)
112+
if (phy_mode < 0) {
113113
dev_err(&pdev->dev, "phy_mode not found\n");
114+
return phy_mode;
115+
}
114116

115117
plat->phy_interface = phy_mode;
116118
plat->interface = PHY_INTERFACE_MODE_GMII;

0 commit comments

Comments
 (0)