* [PATCH] OMAPDSS: VENC: Check for errors from regulator_enable()
@ 2012-03-19 14:56 Mark Brown
2012-03-21 12:49 ` Tomi Valkeinen
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2012-03-19 14:56 UTC (permalink / raw)
To: Tomi Valkeinen, Florian Tobias Schandinat
Cc: linux-omap, linux-fbdev, Mark Brown
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>
---
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);
--
1.7.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] OMAPDSS: VENC: Check for errors from regulator_enable()
2012-03-19 14:56 [PATCH] OMAPDSS: VENC: Check for errors from regulator_enable() Mark Brown
@ 2012-03-21 12:49 ` Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2012-03-21 12:49 UTC (permalink / raw)
To: Mark Brown; +Cc: Florian Tobias Schandinat, linux-omap, linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]
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 <broonie@opensource.wolfsonmicro.com>
> ---
> 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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-21 12:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 14:56 [PATCH] OMAPDSS: VENC: Check for errors from regulator_enable() Mark Brown
2012-03-21 12:49 ` Tomi Valkeinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).