diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-09 13:57:05 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-09 13:57:05 +0100 |
commit | 54a21903df2f8020bd4bc9fe38668c031255e148 (patch) | |
tree | a7b4fd0d08dd860565df089e8fbdbda1bf8b3c7a /drivers/usb/serial/mos7720.c | |
parent | usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS (diff) | |
parent | USB: serial: mos7840: fix another NULL-deref at open (diff) | |
download | linux-54a21903df2f8020bd4bc9fe38668c031255e148.tar.xz linux-54a21903df2f8020bd4bc9fe38668c031255e148.zip |
Merge tag 'usb-serial-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next
Johan writes:
USB-serial updates for v4.11-rc1
These updates include
- a new driver for Renesas uPD78F0730-based devices
- several fixes of failures to check for short transfers, some of which could
lead to minor information leaks, and in one case a loop-condition underflow
- a fix of a long-standing regression in the ftdi_sio driver which resulted
in excessive bulk-in interrupts
- a fix for ftdi_sio line-status over-reporting which could lead to an
endless stream of NULL-characters being forwarded to user space
- a fix for a regression in the console driver
- a fix for another mos7840 NULL-pointer dereference due to a missing endpoint
sanity check
Included are also some clean ups and fixes for various minor issues, as well as
a couple of new device IDs that came in late.
All but the final patch have been in linux-next with no reported issues.
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/mos7720.c')
-rw-r--r-- | drivers/usb/serial/mos7720.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 91bc170b408a..f075121c6e32 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -234,11 +234,16 @@ static int read_mos_reg(struct usb_serial *serial, unsigned int serial_portnum, status = usb_control_msg(usbdev, pipe, request, requesttype, value, index, buf, 1, MOS_WDR_TIMEOUT); - if (status == 1) + if (status == 1) { *data = *buf; - else if (status < 0) + } else { dev_err(&usbdev->dev, "mos7720: usb_control_msg() failed: %d\n", status); + if (status >= 0) + status = -EIO; + *data = 0; + } + kfree(buf); return status; @@ -1846,7 +1851,6 @@ static int get_serial_info(struct moschip_port *mos7720_port, tmp.line = mos7720_port->port->minor; tmp.port = mos7720_port->port->port_number; tmp.irq = 0; - tmp.flags = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ; tmp.xmit_fifo_size = NUM_URBS * URB_TRANSFER_BUFFER_SIZE; tmp.baud_base = 9600; tmp.close_delay = 5*HZ; |