Skip to contentSkip to conversation

phy: mapphone-mdm6600: return error when timed out powering up

PATCH Superseded [email protected] 2 participants 2 messages Nov 16, 2020 Generic PHY framework

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 phy: mapphone-mdm6600: return error when timed out powering up

From: Kaixu Xia <[email protected]>

The value of variable error is overwritten by the following call devm_request_threaded_irq() in phy_mdm6600_device_power_on(), actually we should return error when timed out powering up.

---
v2:
-directly return error when timed out powering.

 drivers/phy/motorola/phy-mapphone-mdm6600.c | 1 +
 1 file changed, 1 insertion(+)
drivers/phy/motorola/phy-mapphone-mdm6600.c +1 -0
index 5172971f4c36..2f461c0d7276 100644
@@ -423,6 +423,7 @@ static int phy_mdm6600_device_power_on(struct phy_mdm6600 *ddata)
 		ddata->enabled = false;
 		error = -ETIMEDOUT;
 		dev_err(ddata->dev, "Timed out powering up\n");
+		return error;
 	}
 
 	/* Reconfigure mode1 GPIO as input for OOB wake */
Signature · 1 line
2.20.0
maintainer
#1 lore raw
Quoted 20 lines · On 16-11-20, 17:11, [email protected] wrote:

From: Kaixu Xia <[email protected]>

The value of variable error is overwritten by the following call devm_request_threaded_irq() in phy_mdm6600_device_power_on(), actually we should return error when timed out powering up.

---
v2:
-directly return error when timed out powering.

 drivers/phy/motorola/phy-mapphone-mdm6600.c | 1 +
 1 file changed, 1 insertion(+)
drivers/phy/motorola/phy-mapphone-mdm6600.c +0 -0
index 5172971f4c36..2f461c0d7276 100644

drivers/phy/motorola/phy-mapphone-mdm6600.c static int phy_mdm6600_device_power_on(struct phy_mdm6600 *ddata) · line 424

Quoted 2 lines
drivers/phy/motorola/phy-mapphone-mdm6600.c +0 -0
@@ -423,6 +423,7 @@ static int phy_mdm6600_device_power_on(struct phy_mdm6600 *ddata)
 		ddata->enabled = false;
 		error = -ETIMEDOUT;

or drop this

drivers/phy/motorola/phy-mapphone-mdm6600.c static int phy_mdm6600_device_power_on(struct phy_mdm6600 *ddata) · line 426

Quoted 2 lines
drivers/phy/motorola/phy-mapphone-mdm6600.c +1 -0
 		dev_err(ddata->dev, "Timed out powering up\n");
+		return error;

and do:

                return -ETIMEDOUT;
Quoted 5 lines
drivers/phy/motorola/phy-mapphone-mdm6600.c +0 -0
 	}
 
 	/* Reconfigure mode1 GPIO as input for OOB wake */
Signature · 1 line
2.20.0
Signature · 1 line
~Vinod