summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-06-14 09:24:40 +0000
committerPaul Mundt <lethal@linux-sh.org>2011-06-15 15:02:59 +0900
commita1bb7010d494d3fcde3814d7a8ac609f1dff96ee (patch)
tree83bb264f00fa09d59e6b79b0285443e46859923e
parentc42a3d543d2bbd2cb72c7179234358a4a33a583d (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>
-rw-r--r--drivers/video/acornfb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
index 6183a57eb69..3bacc129054 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)
if (!(var->vmode & FB_VMODE_YWRAP))
y_bottom += var->yres;
- BUG_ON(y_bottom > var->yres_virtual);
+ if (y_bottom > var->yres_virtual)
+ return -EINVAL;
acornfb_update_dma(info, var);