summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/keyspan_pda.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-06 16:23:19 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-06 16:23:19 +0200
commite3ebc3ad0c680fc294c12e842ee75671e20328eb (patch)
treed28697c4beb451f2a760d9153858eda95ee559ca /drivers/usb/serial/keyspan_pda.c
parentb3a653288e1aeebcc7367dc6d5a42bccbff8bde1 (diff)
parent794744abfffef8b1f3c0c8a4896177d6d13d653d (diff)
Merge tag 'usb-serial-4.18-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
USB-serial fixes for v4.18-rc4 Here are three fixes for broken control-transfer error handling, which could lead to uninitialised slab data leaking to user space. Included is also a new device id for cp210x. All but the final two patches have been in linux-next with no reported issues. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/keyspan_pda.c')
-rw-r--r--drivers/usb/serial/keyspan_pda.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 5169624d8b11..38d43c4b7ce5 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -369,8 +369,10 @@ static int keyspan_pda_get_modem_info(struct usb_serial *serial,
3, /* get pins */
USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_IN,
0, 0, data, 1, 2000);
- if (rc >= 0)
+ if (rc == 1)
*value = *data;
+ else if (rc >= 0)
+ rc = -EIO;
kfree(data);
return rc;