]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: keyspan: handle unbound ports
authorJohan Hovold <johan@kernel.org>
Fri, 17 Jan 2020 09:50:25 +0000 (10:50 +0100)
committerJohan Hovold <johan@kernel.org>
Fri, 17 Jan 2020 15:22:58 +0000 (16:22 +0100)
commite44925fc1333947b0ffd80fd888c1fb558a72802
tree1c6abd3935cd37de4c6c89cfdf17d05831d3863b
parent7a92049828d6e1d53e9b1e9308d1b4e0c08017d8
USB: serial: keyspan: handle unbound ports

Check for NULL port data in the control URB completion handlers to avoid
dereferencing a NULL pointer in the unlikely case where a port device
isn't bound to a driver (e.g. after an allocation failure on port
probe()).

Fixes: 0e9602c71014 ("USB Serial Keyspan: add support for USA-49WG & USA-28XG")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/keyspan.c