linux-xiaomi-chiron/drivers/tty/serial
Andy Shevchenko 7c3e8d9df2 serial: 8250_exar: Avoid NULL pointer dereference at ->exit()
It's possible that during ->exit() the private_data is NULL,
for instance when there was no GPIO device instantiated.
Due to this we may not dereference it. Add a respective check.

Note, for now ->exit() only makes sense when GPIO device
was instantiated, that's why we may use the check for entire
function.

Fixes: 81171e7d31 ("serial: 8250_exar: Constify the software nodes")
Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20210608144239.12697-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-09 14:40:48 +02:00
..
8250 serial: 8250_exar: Avoid NULL pointer dereference at ->exit() 2021-06-09 14:40:48 +02:00
cpm_uart
jsm
21285.c
altera_jtaguart.c
altera_uart.c
amba-pl010.c
amba-pl011.c
amba-pl011.h
apbuart.c
apbuart.h
ar933x_uart.c
arc_uart.c
atmel_serial.c
atmel_serial.h
bcm63xx_uart.c
clps711x.c
digicolor-usart.c
dz.c
dz.h
earlycon-arm-semihost.c
earlycon-riscv-sbi.c
earlycon.c
fsl_linflexuart.c
fsl_lpuart.c
icom.c
icom.h
imx.c
imx_earlycon.c
ip22zilog.c
ip22zilog.h
Kconfig
kgdb_nmi.c
kgdboc.c
lantiq.c
liteuart.c
lpc32xx_hs.c
Makefile
max310x.c serial: max310x: unregister uart driver in case of failure and abort 2021-05-13 17:30:21 +02:00
max3100.c
mcf.c
men_z135_uart.c
meson_uart.c
milbeaut_usio.c
mpc52xx_uart.c
mps2-uart.c
msm_serial.c
mux.c
mvebu-uart.c Revert "serial: mvebu-uart: Fix to avoid a potential NULL pointer dereference" 2021-05-13 17:30:04 +02:00
mxs-auart.c
omap-serial.c
owl-uart.c
pch_uart.c
pic32_uart.c
pic32_uart.h
pmac_zilog.c
pmac_zilog.h
pxa.c
qcom_geni_serial.c
rda-uart.c
rp2.c serial: rp2: use 'request_firmware' instead of 'request_firmware_nowait' 2021-05-21 20:34:02 +02:00
sa1100.c
samsung_tty.c
sb1250-duart.c
sc16is7xx.c
sccnxp.c
serial-tegra.c serial: tegra: Fix a mask operation that is always true 2021-05-13 17:07:43 +02:00
serial_core.c serial: core: fix suspicious security_locked_down() call 2021-05-13 17:08:04 +02:00
serial_mctrl_gpio.c
serial_mctrl_gpio.h
serial_txx9.c
sh-sci.c serial: sh-sci: Fix off-by-one error in FIFO threshold register setting 2021-05-13 17:08:29 +02:00
sh-sci.h
sifive.c
sprd_serial.c
st-asc.c
stm32-usart.c
stm32-usart.h
suncore.c
sunhv.c
sunsab.c
sunsab.h
sunsu.c
sunzilog.c
sunzilog.h
tegra-tcu.c
timbuart.c
timbuart.h
uartlite.c
ucc_uart.c
vr41xx_siu.c
vt8500_serial.c
xilinx_uartps.c
zs.c
zs.h