USB: serial: fix invalid user-pointer checks
Drop invalid user-pointer checks from ioctl handlers. A NULL-pointer can be valid in user space and copy_to_user() takes care of sanity checking. Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
@@ -318,9 +318,6 @@ static int get_serial_info(struct usb_serial_port *port,
|
||||
{
|
||||
struct serial_struct tmp;
|
||||
|
||||
if (!retinfo)
|
||||
return -EFAULT;
|
||||
|
||||
memset(&tmp, 0, sizeof(tmp));
|
||||
tmp.line = port->minor;
|
||||
tmp.port = 0;
|
||||
|
Reference in New Issue
Block a user