Skip to content

Commit 3cfa558

Browse files
Dan Carpentergregkh
Dan Carpenter
authored andcommitted
fbdev: omapfb: off by one in omapfb_register_client()
[ Upstream commit 5ec1ec3 ] The omapfb_register_client[] array has OMAPFB_PLANE_NUM elements so the > should be >= or we are one element beyond the end of the array. Fixes: 8b08cf2 ("OMAP: add TI OMAP framebuffer driver") Signed-off-by: Dan Carpenter <[email protected]> Cc: Imre Deak <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d38d272 commit 3cfa558

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/video/fbdev/omap/omapfb_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ int omapfb_register_client(struct omapfb_notifier_block *omapfb_nb,
958958
{
959959
int r;
960960

961-
if ((unsigned)omapfb_nb->plane_idx > OMAPFB_PLANE_NUM)
961+
if ((unsigned)omapfb_nb->plane_idx >= OMAPFB_PLANE_NUM)
962962
return -EINVAL;
963963

964964
if (!notifier_inited) {

0 commit comments

Comments
 (0)