|
@@ -381,7 +381,7 @@ static void fimd_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);
|
|
@@ -506,7 +506,7 @@ static void fimd_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];
|
|
@@ -622,7 +622,7 @@ static void fimd_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];
|