From: Dan Carpenter Date: Mon, 5 Mar 2012 18:07:11 +0000 (+0300) Subject: tty: cyclades: TIOCSERGETLSR should should store to a uint X-Git-Tag: MMI-PSA29.97-13-9~17267^2~97 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dbca36eab48ee48dfc60b8f41ffad54160ebdd09;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git tty: cyclades: TIOCSERGETLSR should should store to a uint TIOCSERGETLSR should be saved in a uint so the cast here to unsigned long is a bug. Reported-by: Jiri Slaby Signed-off-by: Dan Carpenter Acked-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c index c9bf779481d8..5575fee7a55e 100644 --- a/drivers/tty/cyclades.c +++ b/drivers/tty/cyclades.c @@ -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)