tty: cyclades: TIOCSERGETLSR should should store to a uint
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 5 Mar 2012 18:07:11 +0000 (21:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Mar 2012 19:02:51 +0000 (11:02 -0800)
TIOCSERGETLSR should be saved in a uint so the cast here to unsigned
long is a bug.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/cyclades.c

index c9bf779..5575fee 100644 (file)
@@ -2413,7 +2413,7 @@ static int get_lsr_info(struct cyclades_port *info, unsigned int __user *value)
                /* Not supported yet */
                return -EINVAL;
        }
-       return put_user(result, (unsigned long __user *)value);
+       return put_user(result, value);
 }
 
 static int cy_tiocmget(struct tty_struct *tty)