ChangeSet 1.1060, 2003/04/14 10:22:36-07:00, greg@kroah.com [PATCH] USB: kobil_sct fix up errors found by smatch diff -Nru a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c --- a/drivers/usb/serial/kobil_sct.c Wed Apr 16 10:49:08 2003 +++ b/drivers/usb/serial/kobil_sct.c Wed Apr 16 10:49:08 2003 @@ -514,7 +514,9 @@ dbg("%s - port %d Error in verify_area", __FUNCTION__, port->number); return(result); } - kernel_termios_to_user_termios((struct termios *)arg, &priv->internal_termios); + if (kernel_termios_to_user_termios((struct termios *)arg, + &priv->internal_termios)) + return -EFAULT; return 0; case TCSETS: // 0x5402 @@ -527,7 +529,9 @@ dbg("%s - port %d Error in verify_area", __FUNCTION__, port->number); return result; } - user_termios_to_kernel_termios( &priv->internal_termios, (struct termios *)arg); + if (user_termios_to_kernel_termios(&priv->internal_termios, + (struct termios *)arg)) + return -EFAULT; settings = (unsigned char *) kmalloc(50, GFP_KERNEL); if (! settings) {