]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
USB: serial: mos7840: fix probe error handling
authorJohan Hovold <johan@kernel.org>
Thu, 7 Nov 2019 13:28:56 +0000 (14:28 +0100)
committerJohan Hovold <johan@kernel.org>
Tue, 12 Nov 2019 08:56:45 +0000 (09:56 +0100)
commit960fbd1ca584a5b4cd818255769769d42bfc6dbe
treeb4898add53f7e973990db8cabedf47d2a8f3470b
parent1c333550ea92a9c7a5fdf0f3474eba3387478f20
USB: serial: mos7840: fix probe error handling

The driver would return success and leave the port structures
half-initialised if any of the register accesses during probe fails.

This would specifically leave the port control urb unallocated,
something which could trigger a NULL pointer dereference on interrupt
events.

Fortunately the interrupt implementation is completely broken and has
never even been enabled...

Note that the zero-length-enable register write used to set the zle-flag
for all ports is moved to attach.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/mos7840.c