diff options
author | Johan Hovold <jhovold@gmail.com> | 2014-05-26 19:23:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-30 20:11:58 -0700 |
commit | f95809545bc634388a3e82c2a9088fe931feccf4 (patch) | |
tree | ec1824abbf612413b6bd4e8df8fb51a606536bd1 /kernel | |
parent | b9b8bcc97d19a3175e715474c770b3521764c6c9 (diff) |
USB: serial: fix potential runtime pm imbalance at device remove
commit c14829fad88dbeda57253590695b85ba51270621 upstream.
Only call usb_autopm_put_interface() if the corresponding
usb_autopm_get_interface() was successful.
This prevents a potential runtime PM counter imbalance should
usb_autopm_get_interface() fail. Note that the USB PM usage counter is
reset when the interface is unbound, but that the runtime PM counter may
be left unbalanced.
Also add comment on why we don't need to worry about racing
resume/suspend on autopm_get failures.
Fixes: d5fd650cfc7f ("usb: serial: prevent suspend/resume from racing
against probe/remove")
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions