linux-stable/drivers/tty
Adam Ford 62f353a1bf serial: mctrl_gpio: Check for NULL pointer
[ Upstream commit 37e3ab00e4 ]

When using mctrl_gpio_to_gpiod, it dereferences gpios into a single
requested GPIO.  This dereferencing can break if gpios is NULL,
so this patch adds a NULL check before dereferencing it.  If
gpios is NULL, this function will also return NULL.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Link: https://lore.kernel.org/r/20191006163314.23191-1-aford173@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-06 12:43:11 +01:00
..
hvc
ipwireless tty: ipwireless: fix missing checks for ioremap 2019-05-31 06:47:32 -07:00
serdev
serial serial: mctrl_gpio: Check for NULL pointer 2019-11-06 12:43:11 +01:00
vt tty/vt: fix write/write race in ioctl(KDSKBSENT) handler 2019-05-21 18:50:18 +02:00
amiserial.c
bfin_jtag_comm.c
cyclades.c
ehv_bytechan.c
goldfish.c
isicom.c
Kconfig tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:37:45 +02:00
Makefile
metag_da.c
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c
n_hdlc.c tty: n_hdlc: fix build on SPARC 2019-11-06 12:43:09 +01:00
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c
nozomi.c
pty.c
rocket.c tty: rocket: fix incorrect forward declaration of 'rp_init()' 2019-07-10 09:54:42 +02:00
rocket.h
rocket_int.h
synclink.c
synclink_gt.c
synclinkmp.c
sysrq.c
tty_audit.c
tty_baudrate.c
tty_buffer.c tty: increase the default flip buffer limit to 2*640K 2019-04-05 22:31:37 +02:00
tty_io.c tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:37:45 +02:00
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:37:45 +02:00
tty_ldsem.c tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop 2019-08-16 10:13:55 +02:00
tty_mutex.c
tty_port.c
vcc.c