Commit 3846e93a authored by Laurent Pinchart's avatar Laurent Pinchart

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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
parent 2e1e5979
...@@ -852,7 +852,8 @@ acornfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) ...@@ -852,7 +852,8 @@ acornfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
if (!(var->vmode & FB_VMODE_YWRAP)) if (!(var->vmode & FB_VMODE_YWRAP))
y_bottom += var->yres; y_bottom += var->yres;
BUG_ON(y_bottom > var->yres_virtual); if (y_bottom > var->yres_virtual)
return -EINVAL;
acornfb_update_dma(info, var); acornfb_update_dma(info, var);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment