Skip to contentSkip to conversation

phy: cpcap-usb: Fix missing return statement

PATCH Applied Tony Lindgren 3 participants 3 messages Jun 12, 2017 – Jun 16, 2017 Generic PHY framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: cpcap-usb: Fix missing return statement

Commit 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support") is missing return statement as noted by Colin Ian King <[email protected]>. If the optional pins are not configured, we just want to return early and not attempt to configure the pins.

Fixes 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support")
---
 drivers/phy/motorola/phy-cpcap-usb.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/phy/motorola/phy-cpcap-usb.c +2 -0
@@ -468,6 +468,8 @@ static int cpcap_usb_init_optional_pins(struct cpcap_phy_ddata *ddata)
 		dev_info(ddata->dev, "default pins not configured: %ld\n",
 			 PTR_ERR(ddata->pins));
 		ddata->pins = NULL;
+
+		return 0;
 	}
 
 	ddata->pins_ulpi = pinctrl_lookup_state(ddata->pins, "ulpi");
Signature · 1 line
2.13.0
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 8 lines · Tony Lindgren

Commit 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support") is missing return statement as noted by Colin Ian King <[email protected]>. If the optional pins are not configured, we just want to return early and not attempt to configure the pins.

Fixes 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support")

-- Sebastian

Quoted 22 lines
---
 drivers/phy/motorola/phy-cpcap-usb.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/phy/motorola/phy-cpcap-usb.c +2 -0
@@ -468,6 +468,8 @@ static int cpcap_usb_init_optional_pins(struct cpcap_phy_ddata *ddata)
 		dev_info(ddata->dev, "default pins not configured: %ld\n",
 			 PTR_ERR(ddata->pins));
 		ddata->pins = NULL;
+
+		return 0;
 	}
 
 	ddata->pins_ulpi = pinctrl_lookup_state(ddata->pins, "ulpi");
Signature · 5 lines
2.13.0
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to Tony Lindgren
Quoted 8 lines · Tony Lindgren

Commit 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support") is missing return statement as noted by Colin Ian King <[email protected]>. If the optional pins are not configured, we just want to return early and not attempt to configure the pins.

Fixes 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support")

merged, thanks!

-Kishon

Quoted 17 lines
---
 drivers/phy/motorola/phy-cpcap-usb.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/phy/motorola/phy-cpcap-usb.c +2 -0
@@ -468,6 +468,8 @@ static int cpcap_usb_init_optional_pins(struct cpcap_phy_ddata *ddata)
 		dev_info(ddata->dev, "default pins not configured: %ld\n",
 			 PTR_ERR(ddata->pins));
 		ddata->pins = NULL;
+
+		return 0;
 	}
 
 	ddata->pins_ulpi = pinctrl_lookup_state(ddata->pins, "ulpi");