drm/exynos: fix WINDOWS_NR checking to vidi driver
Subsystems (3)
Inki Dae
maintainerPATCH 1/2 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 <[email protected]>
Signed-off-by Kyungmin Park <[email protected]>
--- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_vidi.c +3 -3
@@ -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];
Signature · 1 line
1.7.5.4