Skip to content

Commit

Permalink
OMAPDSS: VENC: Check for errors from regulator_enable()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Mark Brown authored and Tomi Valkeinen committed Apr 23, 2012
1 parent 9c3d5eb commit ec87410
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/video/omap2/dss/venc.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,9 @@ static int venc_power_on(struct omap_dss_device *dssdev)
dispc_set_digit_size(dssdev->panel.timings.x_res,
dssdev->panel.timings.y_res/2);

regulator_enable(venc.vdda_dac_reg);
r = regulator_enable(venc.vdda_dac_reg);
if (r)
goto err;

if (dssdev->platform_enable)
dssdev->platform_enable(dssdev);
Expand Down

0 comments on commit ec87410

Please sign in to comment.