Skip to content
Commit 56cda5ce authored by Johan Hovold's avatar Johan Hovold Committed by Ben Hutchings
Browse files

USB: serial: quatech2: handle unbound ports

commit 9715a43e upstream.

Check for NULL port data in the modem- and line-status 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).

Note that the other (stubbed) event handlers qt2_process_xmit_empty()
and qt2_process_flush() would need similar sanity checks in case they
are ever implemented.

Fixes: f7a33e60

 ("USB: serial: add quatech2 usb to serial driver")
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 30039fa5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment