linux-stable/drivers/tty
Atul Gopinathan f1f8e62df8 serial: max310x: unregister uart driver in case of failure and abort
[ Upstream commit 3890e3dea3 ]

The macro "spi_register_driver" invokes the function
"__spi_register_driver()" which has a return type of int and can fail,
returning a negative value in such a case. This is currently ignored and
the init() function yields success even if the spi driver failed to
register.

Fix this by collecting the return value of "__spi_register_driver()" and
also unregister the uart driver in case of failure.

Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Atul Gopinathan <atulgopinathan@gmail.com>
Link: https://lore.kernel.org/r/20210503115736.2104747-12-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-03 08:36:20 +02:00
..
hvc tty: hvcs: Don't NULL tty->driver_data until hvcs_cleanup() 2020-10-29 09:07:04 +01:00
ipwireless tty: ipwireless: fix error handling 2020-10-29 09:07:19 +01:00
serdev serdev: ttyport: restore client ops on deregistration 2020-02-28 16:36:12 +01:00
serial serial: max310x: unregister uart driver in case of failure and abort 2021-06-03 08:36:20 +02:00
vt tty: vt: always invoke vc->vc_sw->con_resize callback 2021-05-26 11:47:01 +02:00
amiserial.c
bfin_jtag_comm.c
cyclades.c
ehv_bytechan.c tty: evh_bytechan: Fix out of bounds accesses 2020-04-24 08:01:23 +02:00
goldfish.c
isicom.c
Kconfig
Makefile
metag_da.c
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c tty: n_gsm: Fix bogus i++ in gsm_data_kick 2020-06-25 15:41:53 +02:00
n_hdlc.c
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c
nozomi.c
pty.c pty: do tty_flip_buffer_push without port->lock in pty_write 2020-10-29 09:07:04 +01:00
rocket.c tty: rocket, avoid OOB access 2020-05-02 17:24:30 +02:00
rocket.h
rocket_int.h
synclink.c
synclink_gt.c tty: synclink_gt: Adjust indentation in several functions 2020-02-28 16:36:03 +01:00
synclinkmp.c tty: synclinkmp: Adjust indentation in several functions 2020-02-28 16:36:03 +01:00
sysrq.c sysrq: Remove duplicated sysrq message 2020-03-11 18:02:46 +01:00
tty_audit.c
tty_baudrate.c
tty_buffer.c
tty_io.c tty: fix return value for unsupported ioctls 2021-05-22 10:57:29 +02:00
tty_ioctl.c
tty_jobctrl.c tty: Fix ->session locking 2020-12-11 13:39:04 +01:00
tty_ldisc.c
tty_ldsem.c
tty_mutex.c
tty_port.c serdev: ttyport: restore client ops on deregistration 2020-02-28 16:36:12 +01:00
vcc.c sparc64: vcc: Fix error return code in vcc_probe() 2020-10-01 13:12:42 +02:00