freescale DIU: bug fix: add sanity check for AOI position

AOI position cannot be negative.

Signed-off-by: York Sun <[email protected]>
Cc: Kumar Gala <[email protected]>
Cc: "Antonino A. Daplas" <[email protected]>
Cc: Krzysztof Helt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
York Sun 2008-08-15 00:40:29 -07:00 • committed by Linus Torvalds
commit fdfaa4833f

View file

@ -479,6 +479,10 @@ static void adjust_aoi_size_position(struct fb_var_screeninfo *var,
base_plane_width = machine_data->fsl_diu_info[0]->var.xres;
base_plane_height = machine_data->fsl_diu_info[0]->var.yres;
if (mfbi->x_aoi_d < 0)
mfbi->x_aoi_d = 0;
if (mfbi->y_aoi_d < 0)
mfbi->y_aoi_d = 0;
switch (index) {
case 0:
if (mfbi->x_aoi_d != 0)