提交 a7f98d6a 编写于 作者: I Inki Dae 提交者: Inki Dae

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: NInki Dae <inki.dae@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
上级 37b006e8
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册