summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFabio Baltieri <fabio.baltieri@linaro.org>2013-04-03 16:02:25 +0200
committerFelipe Balbi <balbi@ti.com>2013-04-03 17:15:18 +0300
commit88b1c78db32782041d9548e3c4ab405f9e9eab59 (patch)
tree473542089e2da9b8cc8ee281a9083dd71eca866e /drivers
parentecfd3f7bb3d5dceb8e7ad1c117303c774cb90234 (diff)
usb: phy: ab8500-usb: check regulator_enable return value
Since regulator_enable() is going to be marked as __must_check in the next merge window, always check regulator_enable() return value and print a warning if it fails. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/phy/phy-ab8500-usb.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c
index 749614cf6e2b..4acef26a2ef5 100644
--- a/drivers/usb/phy/phy-ab8500-usb.c
+++ b/drivers/usb/phy/phy-ab8500-usb.c
@@ -167,7 +167,9 @@ static void ab8500_usb_regulator_enable(struct ab8500_usb *ab)
{
int ret, volt;
- regulator_enable(ab->v_ape);
+ ret = regulator_enable(ab->v_ape);
+ if (ret)
+ dev_err(ab->dev, "Failed to enable v-ape\n");
if (!is_ab8500_2p0_or_earlier(ab->ab8500)) {
ab->saved_v_ulpi = regulator_get_voltage(ab->v_ulpi);
@@ -185,7 +187,9 @@ static void ab8500_usb_regulator_enable(struct ab8500_usb *ab)
ret);
}
- regulator_enable(ab->v_ulpi);
+ ret = regulator_enable(ab->v_ulpi);
+ if (ret)
+ dev_err(ab->dev, "Failed to enable vddulpivio18\n");
if (!is_ab8500_2p0_or_earlier(ab->ab8500)) {
volt = regulator_get_voltage(ab->v_ulpi);
@@ -194,7 +198,9 @@ static void ab8500_usb_regulator_enable(struct ab8500_usb *ab)
volt);
}
- regulator_enable(ab->v_musb);
+ ret = regulator_enable(ab->v_musb);
+ if (ret)
+ dev_err(ab->dev, "Failed to enable musb_1v8\n");
}
static void ab8500_usb_regulator_disable(struct ab8500_usb *ab)