linux-stable/drivers/tty
Yang Yingliang bae1a3b8d9 tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe()
commit 447ee1516f upstream.

It will cause null-ptr-deref when using 'res', if platform_get_resource()
returns NULL, so move using 'res' after devm_ioremap_resource() that
will check it to avoid null-ptr-deref.
And use devm_platform_get_and_ioremap_resource() to simplify code.

Fixes: 5930cb3511 ("serial: driver for Conexant Digicolor USART")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Baruch Siach <baruch@tkos.co.il>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220505124621.1592697-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-18 09:18:09 +02:00
..
hvc tty: hvc: fix return value of __setup handler 2022-04-20 09:08:20 +02:00
ipwireless tty: ipwireless: fix error handling 2020-10-29 09:07:19 +01:00
serdev
serial tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe() 2022-05-18 09:18:09 +02:00
vt vt_ioctl: add array_index_nospec to VT_ACTIVATE 2022-02-16 12:44:51 +01:00
amiserial.c
bfin_jtag_comm.c
cyclades.c
ehv_bytechan.c
goldfish.c
isicom.c
Kconfig
Makefile
metag_da.c
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c mxser: fix xmit_buf leak in activate when LSR == 0xff 2022-04-20 09:08:19 +02:00
mxser.h
n_gsm.c tty: n_gsm: fix incorrect UA handling 2022-05-12 12:17:08 +02:00
n_hdlc.c
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c n_tty: wake up poll(POLLRDNORM) on receiving data 2022-02-16 12:44:51 +01:00
nozomi.c tty: nozomi: Fix the error handling path of 'nozomi_card_init()' 2021-07-20 16:17:40 +02:00
pty.c
rocket.c
rocket.h
rocket_int.h
synclink.c
synclink_gt.c
synclinkmp.c
sysrq.c
tty_audit.c
tty_baudrate.c
tty_buffer.c tty: tty_buffer: Fix the softlockup issue in flush_to_ldisc 2021-11-26 11:40:38 +01:00
tty_io.c tty: Fix data race between tiocsti() and flush_to_ldisc() 2021-09-22 11:45:23 +02:00
tty_ioctl.c
tty_jobctrl.c tty: Fix ->session locking 2020-12-11 13:39:04 +01:00
tty_ldisc.c
tty_ldsem.c
tty_mutex.c
tty_port.c
vcc.c