linux-stable/drivers/tty
Colin Ian King 05dd6283b8 8250-men-mcb: fix error checking when get_num_ports returns -ENODEV
[ Upstream commit f50b6805db ]

The current checking for failure on the number of ports fails when
-ENODEV is returned from the call to get_num_ports. Fix this by making
num_ports and loop counter i signed rather than unsigned ints. Also
add check for num_ports being less than zero to check for -ve error
returns.

Addresses-Coverity: ("Unsigned compared against 0")
Fixes: e2fea54e45 ("8250-men-mcb: add support for 16z025 and 16z057")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Michael Moese <mmoese@suse.de>
Link: https://lore.kernel.org/r/20191013220016.9369-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-10 11:27:25 +01:00
..
hvc tty: Don't force RISCV SBI console as preferred console 2019-05-22 07:37:43 +02:00
ipwireless tty: ipwireless: fix missing checks for ioremap 2019-05-31 06:46:30 -07:00
serdev
serial 8250-men-mcb: fix error checking when get_num_ports returns -ENODEV 2019-11-10 11:27:25 +01:00
vt vt/fbcon: deinitialize resources in visual_init() after failed memory allocation 2019-06-09 09:17:21 +02:00
amiserial.c
cyclades.c
ehv_bytechan.c
goldfish.c
isicom.c
Kconfig tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:38:47 +02:00
Makefile
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 13:05:49 +01:00
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c tty: wipe buffer if not echoing data 2018-12-01 09:37:34 +01:00
nozomi.c
pty.c
rocket.c tty: rocket: fix incorrect forward declaration of 'rp_init()' 2019-07-10 09:53:44 +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:33:13 +02:00
tty_io.c tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:38:47 +02:00
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:38:47 +02:00
tty_ldsem.c tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop 2019-08-16 10:12:50 +02:00
tty_mutex.c
tty_port.c tty: do not set TTY_IO_ERROR flag if console port 2018-12-13 09:16:22 +01:00
vcc.c