On Thu, Sep 13, 2018 at 03:40:08AM +0100, Al Viro wrote:
> From: Al Viro <v...@zeniv.linux.org.uk>
> 
> Signed-off-by: Al Viro <v...@zeniv.linux.org.uk>
> ---
>  drivers/tty/amiserial.c | 83 
> ++++++++++++++++++++++---------------------------
>  1 file changed, 38 insertions(+), 45 deletions(-)
> 
> diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
> index 34dead614149..17fc8bb6c6b8 100644
> --- a/drivers/tty/amiserial.c
> +++ b/drivers/tty/amiserial.c
> @@ -996,63 +996,60 @@ static void rs_unthrottle(struct tty_struct * tty)
>   * ------------------------------------------------------------
>   */
>  
> -static int get_serial_info(struct tty_struct *tty, struct serial_state 
> *state,
> -                        struct serial_struct __user * retinfo)
> +static int get_serial_info(struct tty_struct *tty, struct serial_struct *ss)
>  {
> -     struct serial_struct tmp;
> -   
> -     memset(&tmp, 0, sizeof(tmp));
> +     struct serial_state *state = tty->driver_data;
> +
> +     if (serial_paranoia_check(state, tty->name, "rs_ioctl"))
> +             return -ENODEV;

These crazy paranoia check functions just need to be deleted, no need to
add new ones here.  Or we can just delete them later on...

thanks,

greg k-h

Reply via email to