2017-10-27 22:17:24

by Alexey Khoroshilov

[permalink] [raw]
Subject: [PATCH] phy: qcom-usb: Fix error handling in qcom_usb_hsic_phy_power_on()

There is a misprint in error handling of pinctrl_lookup_state(),
where qcom_usb_hsic_phy_power_on() does return instead of goto err_ulpi.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <[email protected]>
---
drivers/phy/qualcomm/phy-qcom-usb-hsic.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-usb-hsic.c b/drivers/phy/qualcomm/phy-qcom-usb-hsic.c
index c110563a73cb..00926df4bc5b 100644
--- a/drivers/phy/qualcomm/phy-qcom-usb-hsic.c
+++ b/drivers/phy/qualcomm/phy-qcom-usb-hsic.c
@@ -57,8 +57,10 @@ static int qcom_usb_hsic_phy_power_on(struct phy *phy)

/* Configure pins for HSIC functionality */
pins_default = pinctrl_lookup_state(uphy->pctl, PINCTRL_STATE_DEFAULT);
- if (IS_ERR(pins_default))
- return PTR_ERR(pins_default);
+ if (IS_ERR(pins_default)) {
+ ret = PTR_ERR(pins_default);
+ goto err_ulpi;
+ }

ret = pinctrl_select_state(uphy->pctl, pins_default);
if (ret)
--
2.7.4


From 1591071755062024045@xxx Wed Jan 31 02:04:28 +0000 2018
X-GM-THRID: 1583463745955685366
X-Gmail-Labels: Inbox,Category Forums,Downloaded_2018-01