Commit 17487fd1 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: kl5kusb105 fix up errors found by smatch

parent ee2892c8
...@@ -964,8 +964,9 @@ static int klsi_105_ioctl (struct usb_serial_port *port, struct file * file, ...@@ -964,8 +964,9 @@ static int klsi_105_ioctl (struct usb_serial_port *port, struct file * file,
if (retval) if (retval)
return(retval); return(retval);
kernel_termios_to_user_termios((struct termios *)arg, if (kernel_termios_to_user_termios((struct termios *)arg,
&priv->termios); &priv->termios))
return -EFAULT;
return(0); return(0);
} }
case TCSETS: { case TCSETS: {
...@@ -980,8 +981,9 @@ static int klsi_105_ioctl (struct usb_serial_port *port, struct file * file, ...@@ -980,8 +981,9 @@ static int klsi_105_ioctl (struct usb_serial_port *port, struct file * file,
if (retval) if (retval)
return(retval); return(retval);
user_termios_to_kernel_termios(&priv->termios, if (user_termios_to_kernel_termios(&priv->termios,
(struct termios *)arg); (struct termios *)arg))
return -EFAULT;
klsi_105_set_termios(port, &priv->termios); klsi_105_set_termios(port, &priv->termios);
return(0); return(0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment