mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 11:46:47 +07:00
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>
This commit is contained in:
parent
c42a3d543d
commit
a1bb7010d4
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user