summaryrefslogtreecommitdiffstats
path: root/drivers/video/acornfb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-05-25 13:43:53 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-08-19 10:29:23 +0200
commit3846e93a65b1a127f59203606c0e92dd22f08782 (patch)
tree8cca271ca9ab3fd4133754f14ca1e8a8a95c8b5a /drivers/video/acornfb.c
parent2e1e5979bbe07f1a72276fd486abb3e693364628 (diff)
downloadblackbird-op-linux-3846e93a65b1a127f59203606c0e92dd22f08782.tar.gz
blackbird-op-linux-3846e93a65b1a127f59203606c0e92dd22f08782.zip
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>
Diffstat (limited to 'drivers/video/acornfb.c')
-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 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)
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);
OpenPOWER on IntegriCloud