diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-06-14 05:24:40 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-06-15 02:02:59 -0400 |
commit | a1bb7010d494d3fcde3814d7a8ac609f1dff96ee (patch) | |
tree | 83bb264f00fa09d59e6b79b0285443e46859923e /drivers/video | |
parent | c42a3d543d2bbd2cb72c7179234358a4a33a583d (diff) |
acornfb: Dont BUG() on invalid pan parameters
The driver currently BUG()s if the pan parameters passed directly from
userspace are invalid. Return -EINVAL instead.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/acornfb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c index 6183a57eb69d..3bacc1290548 100644 --- a/drivers/video/acornfb.c +++ b/drivers/video/acornfb.c | |||
@@ -852,7 +852,8 @@ acornfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) | |||
852 | if (!(var->vmode & FB_VMODE_YWRAP)) | 852 | if (!(var->vmode & FB_VMODE_YWRAP)) |
853 | y_bottom += var->yres; | 853 | y_bottom += var->yres; |
854 | 854 | ||
855 | BUG_ON(y_bottom > var->yres_virtual); | 855 | if (y_bottom > var->yres_virtual) |
856 | return -EINVAL; | ||
856 | 857 | ||
857 | acornfb_update_dma(info, var); | 858 | acornfb_update_dma(info, var); |
858 | 859 | ||