summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-05-25 09:34:52 (GMT)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-08-19 08:31:01 (GMT)
commit465cb7e700e8564fd2d76d5c7f3703eb07659617 (patch)
tree9f4c8df143a71eac0e61515aab660b650241cd48 /drivers
parent8b76c6827991858a52841b6c20fea91a12499d6f (diff)
downloadlinux-fsl-qoriq-465cb7e700e8564fd2d76d5c7f3703eb07659617.tar.xz
fbdev: unicore32: use display information in info not in var for panning
We must not use any information in the passed var besides xoffset, yoffset and vmode as otherwise applications might abuse it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fb-puv3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fb-puv3.c b/drivers/video/fb-puv3.c
index 27f2c57..60a787f 100644
--- a/drivers/video/fb-puv3.c
+++ b/drivers/video/fb-puv3.c
@@ -624,8 +624,8 @@ static int unifb_pan_display(struct fb_var_screeninfo *var,
|| var->xoffset)
return -EINVAL;
} else {
- if (var->xoffset + var->xres > info->var.xres_virtual ||
- var->yoffset + var->yres > info->var.yres_virtual)
+ if (var->xoffset + info->var.xres > info->var.xres_virtual ||
+ var->yoffset + info->var.yres > info->var.yres_virtual)
return -EINVAL;
}
info->var.xoffset = var->xoffset;