linux-sg2042/drivers/tty/serial
Colin Ian King f50b6805db 8250-men-mcb: fix error checking when get_num_ports returns -ENODEV
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>
2019-10-15 21:38:41 +02:00
..
8250 8250-men-mcb: fix error checking when get_num_ports returns -ENODEV 2019-10-15 21:38:41 +02:00
cpm_uart
jsm
21285.c
Kconfig serial/sifive: select SERIAL_EARLYCON 2019-10-04 15:01:15 +02:00
Makefile
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
efm32-uart.c
fsl_linflexuart.c tty: serial: linflexuart: Fix magic SysRq handling 2019-10-04 15:02:28 +02:00
fsl_lpuart.c tty: serial: fsl_lpuart: Fix lpuart_flush_buffer() 2019-10-07 13:21:53 +02:00
icom.c
icom.h
ifx6x60.c
ifx6x60.h
imx.c tty: serial: imx: Use platform_get_irq_optional() for optional IRQs 2019-10-10 13:12:28 +02:00
ip22zilog.c
ip22zilog.h
kgdb_nmi.c
kgdboc.c
lantiq.c
lpc32xx_hs.c
max310x.c
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
mxs-auart.c
omap-serial.c
owl-uart.c
pch_uart.c
pic32_uart.c
pic32_uart.h
pmac_zilog.c
pmac_zilog.h
pnx8xxx_uart.c
pxa.c
qcom_geni_serial.c
rda-uart.c tty: serial: rda: Fix the link time qualifier of 'rda_uart_exit()' 2019-10-04 15:01:15 +02:00
rp2.c
sa1100.c
samsung.c
samsung.h
sb1250-duart.c
sc16is7xx.c
sccnxp.c
serial-tegra.c
serial_core.c serial: fix kernel-doc warning in comments 2019-10-10 13:12:28 +02:00
serial_mctrl_gpio.c serial: mctrl_gpio: Check for NULL pointer 2019-10-07 13:21:54 +02:00
serial_mctrl_gpio.h
serial_txx9.c
sh-sci.c serial: sh-sci: Use platform_get_irq_optional() for optional interrupts 2019-10-04 15:02:28 +02:00
sh-sci.h
sifive.c
sirfsoc_uart.c
sirfsoc_uart.h
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 serial: uartlite: fix exit path null pointer 2019-10-04 15:02:46 +02:00
ucc_uart.c
vr41xx_siu.c
vt8500_serial.c
xilinx_uartps.c serial: uartps: Fix uartps_major handling 2019-10-04 15:14:20 +02:00
zs.c
zs.h