aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-19 11:02:31 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-04-23 03:48:05 -0400
commit956107eadc27ffbcdf80357e16138f9595f0f4fd (patch)
tree538f8791d014419cee70c8a6489215970374d2ff /drivers
parentec8741078d0a644d68827c8a347ac6be153622b5 (diff)
OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable()
It is possible for regulator_enable() to fail and if it does fail that's generally a bad sign for anything we try to do with the hardware afterwards so check for and immediately return an error if regulator_enable() fails. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/displays/panel-tpo-td043mtea1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
index 32f3fcd7f0f0..74c6b873932b 100644
--- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
+++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
@@ -272,11 +272,14 @@ static const struct omap_video_timings tpo_td043_timings = {
272static int tpo_td043_power_on(struct tpo_td043_device *tpo_td043) 272static int tpo_td043_power_on(struct tpo_td043_device *tpo_td043)
273{ 273{
274 int nreset_gpio = tpo_td043->nreset_gpio; 274 int nreset_gpio = tpo_td043->nreset_gpio;
275 int r;
275 276
276 if (tpo_td043->powered_on) 277 if (tpo_td043->powered_on)
277 return 0; 278 return 0;
278 279
279 regulator_enable(tpo_td043->vcc_reg); 280 r = regulator_enable(tpo_td043->vcc_reg);
281 if (r != 0)
282 return r;
280 283
281 /* wait for regulator to stabilize */ 284 /* wait for regulator to stabilize */
282 msleep(160); 285 msleep(160);