Johan Hovold e8f69b16ee net: hso: fix muxed tty registration
If resource allocation and registration fail for a muxed tty device
(e.g. if there are no more minor numbers) the driver should not try to
deregister the never-registered (or already-deregistered) tty.

Fix up the error handling to avoid dereferencing a NULL pointer when
attempting to remove the character device.

Fixes: 72dc1c096c70 ("HSO: add option hso driver")
Cc: stable@vger.kernel.org	# 2.6.27
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-09-17 11:19:58 +01:00
..
2021-08-18 11:46:52 +01:00
2021-07-27 20:11:45 +01:00
2021-06-17 11:30:25 -07:00
2021-06-01 17:05:05 -07:00
2021-07-27 20:11:43 +01:00
2021-07-27 20:11:45 +01:00
2021-09-17 11:19:58 +01:00
2021-06-01 17:05:05 -07:00
2021-06-01 17:05:05 -07:00
2021-07-27 20:11:45 +01:00
2021-06-01 17:05:05 -07:00
2021-07-27 20:11:43 +01:00
2021-07-27 20:11:45 +01:00
2021-07-27 20:11:45 +01:00
2021-07-27 20:11:45 +01:00
2021-07-27 20:11:45 +01:00