diff options
author | York Sun <yorksun@freescale.com> | 2008-08-15 03:40:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-15 11:35:43 -0400 |
commit | fdfaa4833f984c6f8d44afb1fed6c0c775e6e67b (patch) | |
tree | 477d1d2721b1cefb405052ed1dbc814be4dcdb3d /drivers | |
parent | ae5591e3f4754478b397a4e09ebd7cf4774ef88e (diff) |
freescale DIU: bug fix: add sanity check for AOI position
AOI position cannot be negative.
Signed-off-by: York Sun <yorksun@freescale.com>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/fsl-diu-fb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index d9d24938da9e..fb51197d1c98 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
@@ -479,6 +479,10 @@ static void adjust_aoi_size_position(struct fb_var_screeninfo *var, | |||
479 | base_plane_width = machine_data->fsl_diu_info[0]->var.xres; | 479 | base_plane_width = machine_data->fsl_diu_info[0]->var.xres; |
480 | base_plane_height = machine_data->fsl_diu_info[0]->var.yres; | 480 | base_plane_height = machine_data->fsl_diu_info[0]->var.yres; |
481 | 481 | ||
482 | if (mfbi->x_aoi_d < 0) | ||
483 | mfbi->x_aoi_d = 0; | ||
484 | if (mfbi->y_aoi_d < 0) | ||
485 | mfbi->y_aoi_d = 0; | ||
482 | switch (index) { | 486 | switch (index) { |
483 | case 0: | 487 | case 0: |
484 | if (mfbi->x_aoi_d != 0) | 488 | if (mfbi->x_aoi_d != 0) |