diff options
author | Mark Brown | 2012-03-19 16:02:31 +0100 |
---|---|---|
committer | Tomi Valkeinen | 2012-04-23 09:48:05 +0200 |
commit | 956107eadc27ffbcdf80357e16138f9595f0f4fd (patch) | |
tree | 538f8791d014419cee70c8a6489215970374d2ff /drivers/video | |
parent | OMAPDSS: VENC: Check for errors from regulator_enable() (diff) | |
download | kernel-qcow2-linux-956107eadc27ffbcdf80357e16138f9595f0f4fd.tar.gz kernel-qcow2-linux-956107eadc27ffbcdf80357e16138f9595f0f4fd.tar.xz kernel-qcow2-linux-956107eadc27ffbcdf80357e16138f9595f0f4fd.zip |
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/video')
-rw-r--r-- | drivers/video/omap2/displays/panel-tpo-td043mtea1.c | 5 |
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 = { static int tpo_td043_power_on(struct tpo_td043_device *tpo_td043) { int nreset_gpio = tpo_td043->nreset_gpio; + int r; if (tpo_td043->powered_on) return 0; - regulator_enable(tpo_td043->vcc_reg); + r = regulator_enable(tpo_td043->vcc_reg); + if (r != 0) + return r; /* wait for regulator to stabilize */ msleep(160); |