linux-stable/drivers/tty/serial
Jiri Slaby 22077b091a tty: serial_core, remove state checks in uart_poll*
Coverity complains about uart_state checks in polling functions. And it
is indeed correct. We do something like this:
	struct uart_state *state = drv->state + line;
	if (!state)
		return;

Adding 'line' to drv->state would move the potential NULL pointer to
something near NULL and the check is useless. Even if we checked pure
drv->state, nothing guarantees it is not freed and NULLed after the
check. So if the only user of this interface (kgdboc) needs to assure
something, this is neither the correct thing, nor place to do so.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: kgdb-bugreport@lists.sourceforge.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-17 14:17:11 +09:00
..
8250 serial: 8250_fintek: Enable high speed mode on Fintek F81866 2017-03-17 14:17:11 +09:00
cpm_uart tty: serial: cpm_uart: make use of for_each_node_by_type() 2017-02-03 10:12:16 +01:00
jsm
21285.c
altera_jtaguart.c serial: altera_jtaguart: add earlycon support 2017-03-17 14:14:00 +09:00
altera_uart.c
amba-pl010.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
amba-pl011.c Revert "tty: serial: pl011: add ttyAMA for matching pl011 console" 2017-03-14 10:59:04 +08:00
amba-pl011.h
apbuart.c
apbuart.h
ar933x_uart.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
arc_uart.c
atmel_serial.c tty/serial: atmel: move atmel_serial header into driver directory 2017-03-14 10:59:04 +08:00
atmel_serial.h tty/serial: atmel: move atmel_serial header into driver directory 2017-03-14 10:59:04 +08:00
bcm63xx_uart.c
bfin_sport_uart.c tty: serial: constify dev_pm_ops structures 2017-01-19 14:20:23 +01:00
bfin_sport_uart.h
bfin_uart.c
clps711x.c
crisv10.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
crisv10.h
digicolor-usart.c
dz.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
dz.h
earlycon-arm-semihost.c
earlycon.c ACPI: parse SPCR and enable matching console 2016-09-28 17:46:46 +02:00
efm32-uart.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
etraxfs-uart.c
fsl_lpuart.c tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock 2017-01-12 11:51:24 +01:00
icom.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
icom.h
ifx6x60.c serial: ifx6x60: Free memory when probe fails 2016-11-10 14:50:46 +01:00
ifx6x60.h
imx.c serial: imx: Fix the CTS_B polarity in RS485 mode 2017-01-31 10:54:58 +01:00
ioc3_serial.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
ioc4_serial.c scripts/spelling.txt: add "comsume(r)" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
ip22zilog.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
ip22zilog.h
Kconfig uartlite: Adding a kernel parameter for the number of uartlites 2017-03-17 14:14:30 +09:00
kgdb_nmi.c
kgdboc.c
lantiq.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
lpc32xx_hs.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
m32r_sio.c
m32r_sio_reg.h
Makefile tty: serial: Makefile: move kgdb to be initialized last 2016-10-27 16:27:24 +02:00
max310x.c serial: max310x: Add support for newer silicon revisions 2017-01-12 11:51:24 +01:00
max3100.c
mcf.c
men_z135_uart.c
meson_uart.c tty: serial: meson: allow baud-rates higher than 115200 2017-01-19 14:38:57 +01:00
mpc52xx_uart.c
mps2-uart.c
mpsc.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
msm_serial.c tty: serial: msm: Fix module autoload 2017-01-12 11:51:25 +01:00
mux.c
mvebu-uart.c
mxs-auart.c serial: mxs-auart: support CMSPAR termios cflag 2017-01-12 11:51:24 +01:00
netx-serial.c
omap-serial.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
pch_uart.c serial: pch_uart: add terminate entry for dmi_system_id tables 2016-10-27 16:01:31 +02:00
pic32_uart.c serial: pic32_uart: Fix 'request_irq' and 'free_irq' inconsistancy 2017-01-12 11:51:24 +01:00
pic32_uart.h
pmac_zilog.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
pmac_zilog.h
pnx8xxx_uart.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
pxa.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
rp2.c
sa1100.c
samsung.c serial: samsung: Continue to work if DMA request fails 2017-03-07 19:58:37 +01:00
samsung.h serial: samsung: Simplify DMA engine initialization code 2017-01-12 11:51:24 +01:00
sb1250-duart.c drivers: convert sbd_duart.map_guard from atomic_t to refcount_t 2017-03-14 11:01:40 +08:00
sc16is7xx.c sched/headers: Prepare for new header dependencies before moving code to <uapi/linux/sched/types.h> 2017-03-02 08:42:27 +01:00
sccnxp.c
serial-tegra.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
serial_core.c tty: serial_core, remove state checks in uart_poll* 2017-03-17 14:17:11 +09:00
serial_ks8695.c
serial_mctrl_gpio.c
serial_mctrl_gpio.h
serial_txx9.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
sh-sci.c serial: sh-sci: Fix panic when serial console and DMA are enabled 2017-03-14 10:59:04 +08:00
sh-sci.h serial: sh-sci: consider DR (data ready) bit adequately 2017-02-03 10:14:10 +01:00
sirfsoc_uart.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
sirfsoc_uart.h
sn_console.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
sprd_serial.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
st-asc.c serial: st-asc: Use generic DT binding for announcing RTS/CTS lines 2017-02-06 09:47:52 +01:00
stm32-usart.c serial: stm32: mark symbols static where possible 2016-09-27 12:55:27 +02:00
stm32-usart.h serial: stm32: Fix comparisons with undefined register 2016-10-27 16:00:31 +02:00
suncore.c
sunhv.c sparc64: Send break twice from console to return to boot prom 2017-02-23 08:27:24 -08:00
sunsab.c
sunsab.h
sunsu.c serial: sunsu: Free memory when probe fails 2016-11-16 10:57:26 +01:00
sunzilog.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
sunzilog.h
tilegx.c
timbuart.c
timbuart.h
uartlite.c uartlite: Adding a kernel parameter for the number of uartlites 2017-03-17 14:14:30 +09:00
ucc_uart.c
vr41xx_siu.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
vt8500_serial.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
xilinx_uartps.c serial: xuartps: Cleanup the clock enable 2017-03-17 14:14:00 +09:00
zs.c tty: serial: constify uart_ops structures 2017-01-27 09:23:36 +01:00
zs.h