linux-stable/drivers/tty
Yuan Can 03dbb9e2e9 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:32:40 +01:00
..
hvc tty: hvc: remove HVC_IUCV_MAGIC 2022-09-22 16:12:34 +02:00
ipwireless
serdev tty: Replace acpi_bus_get_device() 2022-01-31 14:30:06 +01:00
serial serial: sunsab: Fix error handling in sunsab_init() 2022-12-31 13:32:40 +01:00
vt Merge 6.0-rc4 into tty-next 2022-09-05 07:59:28 +02:00
amiserial.c tty: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
ehv_bytechan.c
goldfish.c tty: goldfish: Fix free_irq() on remove 2022-06-10 13:31:31 +02:00
Kconfig tty: add rpmsg driver 2021-10-21 12:35:35 +02:00
Makefile tty: add rpmsg driver 2021-10-21 12:35:35 +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 tty: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
mxser.c tty: mxser: remove redundant assignment to hwid 2022-09-01 17:59:36 +02:00
n_gsm.c tty: n_gsm: fix sleep-in-atomic-context bug in gsm_control_send 2022-11-03 04:12:09 +01:00
n_hdlc.c tty: n_hdlc: remove HDLC_MAGIC 2022-09-22 16:12:34 +02:00
n_null.c
n_tty.c tty: Make ldisc ->set_termios() old ktermios const 2022-08-30 14:22:34 +02:00
nozomi.c
pty.c tty: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
rpmsg_tty.c tty: rpmsg: Fix race condition releasing tty port 2022-01-26 14:50:26 +01:00
synclink_gt.c tty: synclink_gt: remove MGSL_MAGIC 2022-09-22 16:12:34 +02:00
sysrq.c Merge branch 'rework/kthreads' into for-linus 2022-06-23 19:11:28 +02:00
tty.h tty: Remove baudrate dead code & make ktermios params const 2022-08-30 14:22:34 +02:00
tty_audit.c
tty_baudrate.c tty: Fix comment style in tty_termios_input_baud_rate() 2022-08-30 14:22:34 +02:00
tty_buffer.c tty: Fix lookahead_buf crash with serdev 2022-08-30 14:31:53 +02:00
tty_io.c tty: remove TTY_DRIVER_MAGIC 2022-09-22 16:12:34 +02:00
tty_ioctl.c termios: start unifying non-UAPI parts of asm/termios.h 2022-09-09 10:44:34 +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: reformat kernel-doc in tty_ldisc.c 2021-11-26 16:27:43 +01:00
tty_ldsem.c tty/ldsem: Fix syntax errors in comments 2021-12-21 09:15:49 +01:00
tty_mutex.c tty: remove TTY_MAGIC 2022-09-22 16:12:34 +02:00
tty_port.c tty: Implement lookahead to process XON/XOFF timely 2022-06-10 13:51:31 +02:00
ttynull.c
vcc.c termios: start unifying non-UAPI parts of asm/termios.h 2022-09-09 10:44:34 +02:00