summaryrefslogtreecommitdiff
path: root/drivers/video/fbmem.c
diff options
context:
space:
mode:
authorPeter Samuelson <peter@p12n.org>2008-04-28 02:15:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 08:58:36 -0700
commit57a7a6db0eed2862072497116232f57a6843cadd (patch)
tree7335cd906fce91b3e87cbdcfad42a96ca11847ca /drivers/video/fbmem.c
parentb6f448e99ce7955b9707ed36a46cab2c6ddf7ddc (diff)
fbmem: fix con2fbmap limit check
Fix limit check in FBIOPUT_CON2FBMAP ioctl. Signed-off-by: Peter Samuelson <peter@p12n.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r--drivers/video/fbmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 279c2dbef8f8..0c1461b26dd6 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1057,7 +1057,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case FBIOPUT_CON2FBMAP:
if (copy_from_user(&con2fb, argp, sizeof(con2fb)))
return - EFAULT;
- if (con2fb.console < 0 || con2fb.console > MAX_NR_CONSOLES)
+ if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
return -EINVAL;
if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
return -EINVAL;