]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
USB: serial: ark3116: fix open error handling
authorJohan Hovold <johan@kernel.org>
Thu, 12 Jan 2017 13:56:10 +0000 (14:56 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 20 Jun 2017 08:46:31 +0000 (10:46 +0200)
commit4bb5fe1b5338e52aed3eaba04f09e77415df9aec
treedcc58cf37bf951aff1abb67ae7a87ab36171c242
parente6c939bfb2721871ad9351ab797ceabac5e35c9d
USB: serial: ark3116: fix open error handling

BugLink: http://bugs.launchpad.net/bugs/1691369
commit b631433b175f1002a31020e09bbfc2e5caecf290 upstream.

Fix open error handling which failed to detect errors when reading the
MSR and LSR registers, something which could lead to the shadow
registers being initialised from errnos.

Note that calling the generic close implementation is sufficient in the
error paths as the interrupt urb has not yet been submitted and the
register updates have not been made.

Fixes: f4c1e8d597d1 ("USB: ark3116: Make existing functions 16450-aware
and add close and release functions.")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/usb/serial/ark3116.c