diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-06-08 19:03:19 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-06-08 19:03:18 -0700 |
| commit | bc2254655174adf0c5cca54937b2969855314eb3 (patch) | |
| tree | 0bd44b2012efbbbb3244dccd19d543018b7f18db /drivers/usb/class/cdc-acm.c | |
| parent | 9725c4d90bee3b0be78bb1fdc084df1ec08d7d24 (diff) | |
| parent | 2025064255a87606e2da561de77dcd68daf8b26d (diff) | |
Merge "Merge branch 'android-4.4@9bc4622' into branch 'msm-4.4'"
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
| -rw-r--r-- | drivers/usb/class/cdc-acm.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 96849e2e7435..0b7194086c5a 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -311,6 +311,12 @@ static void acm_ctrl_irq(struct urb *urb) break; case USB_CDC_NOTIFY_SERIAL_STATE: + if (le16_to_cpu(dr->wLength) != 2) { + dev_dbg(&acm->control->dev, + "%s - malformed serial state\n", __func__); + break; + } + newctrl = get_unaligned_le16(data); if (!acm->clocal && (acm->ctrlin & ~newctrl & ACM_CTRL_DCD)) { @@ -347,11 +353,10 @@ static void acm_ctrl_irq(struct urb *urb) default: dev_dbg(&acm->control->dev, - "%s - unknown notification %d received: index %d " - "len %d data0 %d data1 %d\n", + "%s - unknown notification %d received: index %d len %d\n", __func__, - dr->bNotificationType, dr->wIndex, - dr->wLength, data[0], data[1]); + dr->bNotificationType, dr->wIndex, dr->wLength); + break; } exit: |
