android_kernel_xiaomi_sm8350/drivers/tty/serial
Yuan Can 98c01a728b serial: sunsab: Fix error handling in sunsab_init()
[ Upstream commit 1a6ec673fb627c26e2267ca0a03849f91dbd9b40 ]

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>
2023-01-18 11:41:23 +01:00
..
8250 serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios() 2022-12-08 11:23:00 +01:00
cpm_uart
jsm drivers: serial: jsm: fix some leaks in probe 2022-10-26 13:22:40 +02:00
21285.c
altera_jtaguart.c
altera_uart.c serial: altera_uart: fix locking in polling mode 2023-01-18 11:41:23 +01:00
amba-pl010.c
amba-pl011.c serial: pl011: Do not clear RX FIFO & RX interrupt in unthrottle. 2023-01-18 11:41:23 +01:00
amba-pl011.h
apbuart.c
apbuart.h
ar933x_uart.c
arc_uart.c
atmel_serial.c tty: serial: atmel: Preserve previous USART mode if RS485 disabled 2022-09-28 11:04:02 +02:00
atmel_serial.h
bcm63xx_uart.c
clps711x.c
digicolor-usart.c serial: digicolor-usart: Don't allow CS5-6 2022-06-14 18:11:53 +02:00
dz.c
dz.h
earlycon-arm-semihost.c
earlycon-riscv-sbi.c
earlycon.c
efm32-uart.c
fsl_linflexuart.c
fsl_lpuart.c tty: serial: fsl_lpuart: disable dma rx/tx use flags in lpuart_dma_shutdown 2022-10-26 13:22:40 +02:00
icom.c tty: Fix a possible resource leak in icom_probe 2022-06-14 18:11:59 +02:00
icom.h
ifx6x60.c
ifx6x60.h
imx.c serial: imx: Add missing .thaw_noirq hook 2022-11-25 17:42:14 +01:00
ip22zilog.c
ip22zilog.h
Kconfig
kgdb_nmi.c
kgdboc.c kgdboc: fix return value of __setup handler 2022-04-15 14:18:20 +02:00
lantiq.c
lpc32xx_hs.c tty: drivers/tty/, stop using tty_schedule_flip() 2022-07-29 17:14:19 +02:00
Makefile
max310x.c
max3100.c
mcf.c
men_z135_uart.c
meson_uart.c serial: meson: acquire port->lock in startup() 2022-06-14 18:11:53 +02:00
milbeaut_usio.c
mpc52xx_uart.c
mps2-uart.c
msm_serial.c serial: msm_serial: disable interrupts in __msm_console_write() 2022-06-14 18:12:00 +02:00
mux.c
mvebu-uart.c serial: mvebu-uart: uart2 error bits clearing 2022-08-25 11:17:24 +02:00
mxs-auart.c
omap-serial.c
owl-uart.c tty: serial: owl: Fix missing clk_disable_unprepare() in owl_uart_probe 2022-06-14 18:11:51 +02:00
pch_uart.c serial: pch: Fix PCI device refcount leak in pch_request_dma() 2023-01-18 11:41:23 +01:00
pic32_uart.c
pic32_uart.h
pmac_zilog.c
pmac_zilog.h
pnx8xxx_uart.c
pxa.c
qcom_geni_serial.c
rda-uart.c serial: rda-uart: Don't allow CS5-6 2022-06-14 18:11:53 +02:00
rp2.c
sa1100.c drivers: tty: serial: Fix deadlock in sa1100_set_termios() 2022-06-14 18:11:59 +02:00
samsung.c tty: serial: samsung_tty: set dma burst_size to 1 2022-07-21 20:59:28 +02:00
samsung.h
sb1250-duart.c
sc16is7xx.c
sccnxp.c
serial_core.c
serial_mctrl_gpio.c
serial_mctrl_gpio.h
serial_txx9.c serial: txx9: Don't allow CS5-6 2022-06-14 18:11:53 +02:00
serial-tegra.c serial: tegra: Read DMA status before terminating 2023-01-18 11:41:21 +01:00
sh-sci.c serial: sh-sci: Don't allow CS5-6 2022-06-14 18:11:53 +02:00
sh-sci.h
sifive.c serial: sifive: Sanitize CSIZE and c_iflag 2022-06-14 18:11:53 +02:00
sirfsoc_uart.c
sirfsoc_uart.h
sprd_serial.c
st-asc.c serial: st-asc: Sanitize CSIZE and correct PARENB for CS7 2022-06-14 18:11:53 +02:00
stm32-usart.c serial: stm32: Clear prev values before setting RTS delays 2022-07-21 20:59:28 +02:00
stm32-usart.h
suncore.c
sunhv.c
sunsab.c serial: sunsab: Fix error handling in sunsab_init() 2023-01-18 11:41:23 +01:00
sunsab.h
sunsu.c
sunzilog.c
sunzilog.h
tegra-tcu.c serial: tegra-tcu: Use uart_xmit_advance(), fixes icount.tx accounting 2022-09-28 11:04:08 +02:00
timbuart.c
timbuart.h
uartlite.c
ucc_uart.c tty: serial: Fix refcount leak bug in ucc_uart.c 2022-08-25 11:18:36 +02:00
vr41xx_siu.c
vt8500_serial.c
xilinx_uartps.c tty: xilinx_uartps: Fix the ignore_status 2022-10-26 13:22:36 +02:00
zs.c
zs.h