linux-stable/drivers/tty
Yuan Can 0a2e7488e6 serial: sunsab: Fix error handling in sunsab_init()
[ Upstream commit 1a6ec673fb ]

The sunsab_init() returns the platform_driver_register() directly without
checking its return value, if platform_driver_register() failed, the
allocated sunsab_ports is leaked.
Fix by free sunsab_ports and set it to NULL when platform_driver_register()
failed.

Fixes: c4d37215a8 ("[SERIAL] sunsab: Convert to of_driver framework.")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Link: https://lore.kernel.org/r/20221123061212.52593-1-yuancan@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:26:26 +01:00
..
hvc xen: branch for v5.19-rc1b 2022-06-04 13:42:53 -07:00
ipwireless
serdev
serial serial: sunsab: Fix error handling in sunsab_init() 2022-12-31 13:26:26 +01:00
vt vt: Clear selection before changing the font 2022-08-30 14:30:52 +02:00
Kconfig
Makefile
amiserial.c tty: amiserial: Fix comment typo 2022-07-28 16:33:29 +02:00
ehv_bytechan.c
goldfish.c tty: goldfish: Fix free_irq() on remove 2022-06-10 13:31:31 +02:00
mips_ejtag_fdc.c serial: Convert SERIAL_XMIT_SIZE to UART_XMIT_SIZE 2022-06-27 14:41:31 +02:00
moxa.c
mxser.c tty: remove BOTHER ifdefs 2022-05-19 18:26:17 +02:00
n_gsm.c Revert "tty: n_gsm: replace kicktimer with delayed_work" 2022-12-02 17:43:14 +01:00
n_hdlc.c
n_null.c
n_tty.c tty: Use flow-control char function on closing path 2022-06-10 13:51:31 +02:00
nozomi.c
pty.c tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() 2022-07-08 15:16:28 +02:00
rpmsg_tty.c
synclink_gt.c
sysrq.c Merge branch 'rework/kthreads' into for-linus 2022-06-23 19:11:28 +02:00
tty.h tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() 2022-07-08 15:16:28 +02:00
tty_audit.c
tty_baudrate.c tty: remove IBSHIFT ifdefs 2022-05-19 18:26:17 +02:00
tty_buffer.c tty: Fix lookahead_buf crash with serdev 2022-08-30 14:31:53 +02:00
tty_io.c tty: fix typos in comments 2022-06-10 13:32:52 +02:00
tty_ioctl.c serial: Support for RS-485 multipoint addresses 2022-06-27 14:44:20 +02:00
tty_jobctrl.c signal: Replace __group_send_sig_info with send_signal_locked 2022-05-11 14:33:17 -05:00
tty_ldisc.c
tty_ldsem.c
tty_mutex.c
tty_port.c tty: Implement lookahead to process XON/XOFF timely 2022-06-10 13:51:31 +02:00
ttynull.c
vcc.c