]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
USB: serial: ch341: handle unbound port at reset_resume
authorJohan Hovold <johan@kernel.org>
Fri, 17 Jan 2020 09:50:22 +0000 (10:50 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit5eb88dea5a89139bb73f2ddf68b3f07392fefc15
treed5c03f27b5d1e812e7db81a471fd0d2e491dbd83
parent04a02c6c64ea6a314489b215ce038e1d13227c27
USB: serial: ch341: handle unbound port at reset_resume

BugLink: https://bugs.launchpad.net/bugs/1862259
commit 4d5ef53f75c22d28f490bcc5c771fcc610a9afa4 upstream.

Check for NULL port data in reset_resume() to avoid dereferencing a NULL
pointer in case the port device isn't bound to a driver (e.g. after a
failed control request at port probe).

Fixes: 1ded7ea47b88 ("USB: ch341 serial: fix port number changed after resume")
Cc: stable <stable@vger.kernel.org> # 2.6.30
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: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/serial/ch341.c