Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 956107ea authored by Mark Brown's avatar Mark Brown Committed by Tomi Valkeinen
Browse files

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent ec874107
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);