summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2016-11-08 15:10:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-18 08:55:47 +0300
commit003745315c0a0d8d77074bc41a47e513f21b3e97 (patch)
tree70be8a09e7bd9bb00e241293b86f08c58b82fb2f
parent81bee3aa75f6c00f642eca6f2d0bd697a30a3d63 (diff)
downloadlinux-003745315c0a0d8d77074bc41a47e513f21b3e97.tar.xz
USB: cdc-acm: fix TIOCMIWAIT
commit 18266403f3fe507f0246faa1d5432333a2f139ca upstream. The TIOCMIWAIT implementation would return -EINVAL if any of the three supported signals were included in the mask. Instead of returning an error in case TIOCM_CTS is included, simply drop the mask check completely, which is in accordance with how other drivers implement this ioctl. Fixes: 5a6a62bdb925 ("cdc-acm: add TIOCMIWAIT") Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/class/cdc-acm.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index e2f63f5d30cb..201e9229d323 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -872,8 +872,6 @@ static int wait_serial_change(struct acm *acm, unsigned long arg)
DECLARE_WAITQUEUE(wait, current);
struct async_icount old, new;
- if (arg & (TIOCM_DSR | TIOCM_RI | TIOCM_CD ))
- return -EINVAL;
do {
spin_lock_irq(&acm->read_lock);
old = acm->oldcount;