linux-stable/drivers/tty
Yuan Can 07d547d742 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:14:28 +01:00
..
hvc
ipwireless
serdev
serial serial: sunsab: Fix error handling in sunsab_init() 2022-12-31 13:14:28 +01:00
vt vt: Clear selection before changing the font 2022-09-08 12:28:03 +02:00
amiserial.c
ehv_bytechan.c
goldfish.c tty: drivers/tty/, stop using tty_schedule_flip() 2022-07-29 17:25:31 +02:00
Kconfig
Makefile
mips_ejtag_fdc.c
moxa.c tty: drivers/tty/, stop using tty_schedule_flip() 2022-07-29 17:25:31 +02:00
moxa.h
mxser.c
n_gsm.c tty: n_gsm: fix sleep-in-atomic-context bug in gsm_control_send 2022-11-26 09:24:35 +01:00
n_hdlc.c
n_null.c
n_tty.c tty: n_tty: Restore EOF push handling behavior 2022-06-14 18:36:03 +02:00
nozomi.c
pty.c tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() 2022-07-29 17:25:32 +02:00
synclink_gt.c tty: synclink_gt: Fix null-pointer-dereference in slgt_clean() 2022-06-14 18:36:20 +02:00
sysrq.c sysrq: do not omit current cpu when showing backtrace of all active CPUs 2022-06-14 18:36:21 +02:00
tty.h tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() 2022-07-29 17:25:32 +02:00
tty_audit.c
tty_baudrate.c
tty_buffer.c tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() 2022-07-29 17:25:32 +02:00
tty_io.c
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c
tty_ldsem.c
tty_mutex.c
tty_port.c
ttynull.c
vcc.c