diff options
author | Inki Dae <inki.dae@samsung.com> | 2013-05-28 16:01:21 +0900 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2013-06-28 21:11:48 +0900 |
commit | a7f98d6a929ff1cd8378522372f36faf8b9f9a37 (patch) | |
tree | 8487fb886412f9f61409a6605ff532a1b09ce285 /drivers/gpu/drm/exynos | |
parent | 37b006e88e090392cdb2787ef344193702c1d75b (diff) | |
download | blackbird-op-linux-a7f98d6a929ff1cd8378522372f36faf8b9f9a37.tar.gz blackbird-op-linux-a7f98d6a929ff1cd8378522372f36faf8b9f9a37.zip |
drm/exynos: fix WINDOWS_NR checking to vidi driver
This patch just checks if win_data array range is valid
or not correctly.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_vidi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 24376c194a5e..11a016d49a44 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -282,7 +282,7 @@ static void vidi_win_mode_set(struct device *dev, if (win == DEFAULT_ZPOS) win = ctx->default_win; - if (win < 0 || win > WINDOWS_NR) + if (win < 0 || win >= WINDOWS_NR) return; offset = overlay->fb_x * (overlay->bpp >> 3); @@ -332,7 +332,7 @@ static void vidi_win_commit(struct device *dev, int zpos) if (win == DEFAULT_ZPOS) win = ctx->default_win; - if (win < 0 || win > WINDOWS_NR) + if (win < 0 || win >= WINDOWS_NR) return; win_data = &ctx->win_data[win]; @@ -356,7 +356,7 @@ static void vidi_win_disable(struct device *dev, int zpos) if (win == DEFAULT_ZPOS) win = ctx->default_win; - if (win < 0 || win > WINDOWS_NR) + if (win < 0 || win >= WINDOWS_NR) return; win_data = &ctx->win_data[win]; |