diff mbox

omapfb: Return error code when applying overlay settings fails

Message ID 1422604786-6804-1-git-send-email-pmeerw@pmeerw.net (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Meerwald-Stadler Jan. 30, 2015, 7:59 a.m. UTC
the check of the return code is missing, user space does not get notified
about the error condition:

omapdss OVERLAY error: overlay 2 horizontally not inside the display area (403 + 800 >= 800)
omapdss APPLY error: failed to apply settings: illegal configuration.

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
 drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Tomi Valkeinen Feb. 4, 2015, 10:42 a.m. UTC | #1
On 30/01/15 09:59, Peter Meerwald wrote:
> the check of the return code is missing, user space does not get notified
> about the error condition:
> 
> omapdss OVERLAY error: overlay 2 horizontally not inside the display area (403 + 800 >= 800)
> omapdss APPLY error: failed to apply settings: illegal configuration.
> 
> Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
> ---
>  drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
> index 146b6f5..9ddfdd6 100644
> --- a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
> +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
> @@ -137,8 +137,11 @@ static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
>  			goto undo;
>  	}
>  
> -	if (ovl->manager)
> -		ovl->manager->apply(ovl->manager);
> +	if (ovl->manager) {
> +		r = ovl->manager->apply(ovl->manager);
> +		if (r)
> +			goto undo;
> +	}
>  
>  	if (pi->enabled) {
>  		r = ovl->enable(ovl);
> 

Thanks, queued for 3.20.

 Tomi
diff mbox

Patch

diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
index 146b6f5..9ddfdd6 100644
--- a/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
+++ b/drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c
@@ -137,8 +137,11 @@  static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
 			goto undo;
 	}
 
-	if (ovl->manager)
-		ovl->manager->apply(ovl->manager);
+	if (ovl->manager) {
+		r = ovl->manager->apply(ovl->manager);
+		if (r)
+			goto undo;
+	}
 
 	if (pi->enabled) {
 		r = ovl->enable(ovl);