diff options
author | Fabio Baltieri <fabio.baltieri@linaro.org> | 2013-04-03 10:02:25 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-04-03 10:15:18 -0400 |
commit | 88b1c78db32782041d9548e3c4ab405f9e9eab59 (patch) | |
tree | 473542089e2da9b8cc8ee281a9083dd71eca866e /drivers | |
parent | ecfd3f7bb3d5dceb8e7ad1c117303c774cb90234 (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.c | 12 |
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) | |||
167 | { | 167 | { |
168 | int ret, volt; | 168 | int ret, volt; |
169 | 169 | ||
170 | regulator_enable(ab->v_ape); | 170 | ret = regulator_enable(ab->v_ape); |
171 | if (ret) | ||
172 | dev_err(ab->dev, "Failed to enable v-ape\n"); | ||
171 | 173 | ||
172 | if (!is_ab8500_2p0_or_earlier(ab->ab8500)) { | 174 | if (!is_ab8500_2p0_or_earlier(ab->ab8500)) { |
173 | ab->saved_v_ulpi = regulator_get_voltage(ab->v_ulpi); | 175 | ab->saved_v_ulpi = regulator_get_voltage(ab->v_ulpi); |
@@ -185,7 +187,9 @@ static void ab8500_usb_regulator_enable(struct ab8500_usb *ab) | |||
185 | ret); | 187 | ret); |
186 | } | 188 | } |
187 | 189 | ||
188 | regulator_enable(ab->v_ulpi); | 190 | ret = regulator_enable(ab->v_ulpi); |
191 | if (ret) | ||
192 | dev_err(ab->dev, "Failed to enable vddulpivio18\n"); | ||
189 | 193 | ||
190 | if (!is_ab8500_2p0_or_earlier(ab->ab8500)) { | 194 | if (!is_ab8500_2p0_or_earlier(ab->ab8500)) { |
191 | volt = regulator_get_voltage(ab->v_ulpi); | 195 | volt = regulator_get_voltage(ab->v_ulpi); |
@@ -194,7 +198,9 @@ static void ab8500_usb_regulator_enable(struct ab8500_usb *ab) | |||
194 | volt); | 198 | volt); |
195 | } | 199 | } |
196 | 200 | ||
197 | regulator_enable(ab->v_musb); | 201 | ret = regulator_enable(ab->v_musb); |
202 | if (ret) | ||
203 | dev_err(ab->dev, "Failed to enable musb_1v8\n"); | ||
198 | } | 204 | } |
199 | 205 | ||
200 | static void ab8500_usb_regulator_disable(struct ab8500_usb *ab) | 206 | static void ab8500_usb_regulator_disable(struct ab8500_usb *ab) |