mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
usb: phy: snps: Return error if driver fails to enable power
Currently driver is not returning any error from the error handling path if driver fails to enable power for PHY. This patch adds a check and returns error if the driver actually fails to set_voltage or fails to enable a particular regulator. Change-Id: I5427690602b6152151adee71c6388ce836ab90c6 Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
This commit is contained in:
parent
d948568a1f
commit
026280fcfa
1 changed files with 6 additions and 0 deletions
|
|
@ -275,6 +275,12 @@ put_vdd_lpm:
|
|||
ret = regulator_set_load(phy->vdd, 0);
|
||||
if (ret < 0)
|
||||
dev_err(phy->phy.dev, "Unable to set LPM of vdd\n");
|
||||
/* Return from here based on power_enabled. If it is not set
|
||||
* then return -EINVAL since either set_voltage or
|
||||
* regulator_enable failed
|
||||
*/
|
||||
if (!phy->power_enabled)
|
||||
return -EINVAL;
|
||||
err_vdd:
|
||||
phy->power_enabled = false;
|
||||
dev_dbg(phy->phy.dev, "HSUSB PHY's regulators are turned OFF.\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue