]> git.baikalelectronics.ru Git - kernel.git/commit
USB: cdc-acm: fix double usb_autopm_put_interface() in acm_port_activate()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 11 Apr 2014 22:10:45 +0000 (02:10 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Apr 2014 20:56:08 +0000 (13:56 -0700)
commit52d2ddfddbc6069df1571e3084a27d629f705ab9
tree234e8b760c190f6a93a8f8de0776aaf2e93f5cd0
parent2ac9466a26303dcea544fb8e767b241ae223be1e
USB: cdc-acm: fix double usb_autopm_put_interface() in acm_port_activate()

If acm_submit_read_urbs() fails in acm_port_activate(), error handling
code calls usb_autopm_put_interface() while it is already called
before acm_submit_read_urbs(). The patch reorganizes error handling code
to avoid double decrement of USB interface's PM-usage counter.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c