linux-stable/drivers/tty/serial
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
..
8250 serial: 8250_bcm7271: Fix error handling in brcmuart_init() 2022-12-31 13:32:38 +01:00
cpm_uart serial: cpm_uart: Don't request IRQ too early for console port 2022-09-30 14:59:19 +02:00
jsm drivers: serial: jsm: fix some leaks in probe 2022-09-22 16:11:43 +02:00
21285.c TTY/Serial driver update for 6.1-rc1 2022-10-07 16:36:24 -07:00
altera_jtaguart.c tty: serial: do unlock on a common path in altera_jtaguart_console_putc() 2022-09-30 14:58:46 +02:00
altera_uart.c serial: altera_uart: fix locking in polling mode 2022-12-31 13:32:40 +01:00
amba-pl010.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
amba-pl011.c serial: pl011: Do not clear RX FIFO & RX interrupt in unthrottle. 2022-12-31 13:32:39 +01:00
apbuart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
apbuart.h
ar933x_uart.c serial: ar933x: Deassert Transmit Enable on ->rs485_config() 2022-09-22 16:43:05 +02:00
arc_uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
atmel_serial.c tty: serial: atmel: Make the driver aware of the existence of GCLK 2022-09-22 16:31:56 +02:00
atmel_serial.h tty: serial: atmel: Use FIELD_PREP/FIELD_GET 2022-09-22 16:32:25 +02:00
bcm63xx_uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
clps711x.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
digicolor-usart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
dz.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
dz.h
earlycon-arm-semihost.c serial: make uart_console_write->putchar()'s character an unsigned char 2022-03-03 15:06:31 +01:00
earlycon-riscv-sbi.c serial: make uart_console_write->putchar()'s character an unsigned char 2022-03-03 15:06:31 +01:00
earlycon.c tty: move from strlcpy with unused retval to strscpy 2022-08-30 14:21:59 +02:00
fsl_linflexuart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
fsl_lpuart.c tty: serial: fsl_lpuart: don't break the on-going transfer when global reset 2022-11-03 04:12:09 +01:00
icom.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
imx.c serial: imx: Add missing .thaw_noirq hook 2022-11-03 04:12:09 +01:00
imx_earlycon.c serial: make uart_console_write->putchar()'s character an unsigned char 2022-03-03 15:06:31 +01:00
ip22zilog.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
ip22zilog.h
Kconfig parisc architecture fixes and updates for kernel v6.1-rc1: 2022-10-14 12:10:01 -07:00
kgdb_nmi.c tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
kgdboc.c serial: kgdboc: Fix typo in comment 2022-06-27 14:37:09 +02:00
lantiq.c tty: serial: use FIELD_GET() in lqasc_tx_ready() 2022-09-30 14:58:45 +02:00
liteuart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
lpc32xx_hs.c tty: serial: extract tx_ready() from __serial_lpc32xx_tx() 2022-09-22 16:14:08 +02:00
Makefile serial: remove VR41XX serial driver 2022-07-16 08:16:01 +02:00
max310x.c TTY/Serial driver update for 6.1-rc1 2022-10-07 16:36:24 -07:00
max3100.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
mcf.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
men_z135_uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
meson_uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
milbeaut_usio.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
mpc52xx_uart.c tty: serial: switch mpc52xx_uart_int_{r,t}x_chars() to bool 2022-09-22 16:14:08 +02:00
mps2-uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
msm_serial.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
mux.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
mvebu-uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
mxs-auart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
omap-serial.c tty: serial: extract serial_omap_put_char() from transmit_chars() 2022-09-22 16:14:08 +02:00
owl-uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
pch_uart.c serial: pch: Fix PCI device refcount leak in pch_request_dma() 2022-12-31 13:32:40 +01:00
pic32_uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
pmac_zilog.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
pmac_zilog.h serial: pmac_zilog: remove unused uart_pmac_port::termios_cache 2022-05-19 18:23:19 +02:00
pxa.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
qcom_geni_serial.c tty: serial: qcom-geni-serial: Replace hardcoded icc flags with macros. 2022-09-08 08:19:24 +02:00
rda-uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
rp2.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sa1100.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
samsung_tty.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sb1250-duart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sc16is7xx.c TTY/Serial driver update for 6.1-rc1 2022-10-07 16:36:24 -07:00
sccnxp.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
serial-tegra.c serial: tegra: Read DMA status before terminating 2022-12-31 13:32:38 +01:00
serial_core.c serial: Deassert Transmit Enable on probe in driver-specific way 2022-09-25 09:28:57 +02:00
serial_mctrl_gpio.c Documentation: serial: move GPIO kernel-doc to the functions 2022-07-28 10:37:42 +02:00
serial_mctrl_gpio.h serial: mctrl_gpio: add a new API to enable / disable wake_irq 2022-02-08 11:07:16 +01:00
serial_txx9.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sh-sci.c serial: sh-sci: tail is already on valid range 2022-08-30 14:23:05 +02:00
sh-sci.h serial: sh-sci: Add support for RZ/G2L SoC 2021-06-04 15:12:40 +02:00
sifive.c Merge 7e2cd21e02 ("Merge tag 'tty-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty") into tty-next 2022-09-25 09:22:13 +02:00
sprd_serial.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
st-asc.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
stm32-usart.c serial: stm32: move dma_request_chan() before clk_prepare_enable() 2022-12-31 13:32:39 +01:00
stm32-usart.h serial: stm32: make info structs static to avoid sparse warnings 2022-07-28 10:35:23 +02:00
suncore.c
sunhv.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sunplus-uart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sunsab.c serial: sunsab: Fix error handling in sunsab_init() 2022-12-31 13:32:40 +01:00
sunsab.h
sunsu.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sunzilog.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
sunzilog.h
tegra-tcu.c Merge 7e2cd21e02 ("Merge tag 'tty-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty") into tty-next 2022-09-25 09:22:13 +02:00
timbuart.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
timbuart.h
uartlite.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
ucc_uart.c serial: ucc_uart: Remove custom frame size calculation 2022-08-30 14:28:33 +02:00
vt8500_serial.c tty: serial: move and cleanup vt8500_tx_empty() 2022-09-22 16:14:07 +02:00
xilinx_uartps.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
zs.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
zs.h