On Mon, 2012-03-19 at 14:56 +0000, Mark Brown wrote:
> 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 <[email protected]>
> ---
>  drivers/video/omap2/dss/venc.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
> index 9c3daf7..abfbd4a 100644
> --- a/drivers/video/omap2/dss/venc.c
> +++ b/drivers/video/omap2/dss/venc.c
> @@ -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);

Thanks, I'll apply to omapdss tree.

 Tomi

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to