]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc: Fix bad NULL pointer check in udbg_uart_getc_poll()
authorAnton Blanchard <anton@samba.org>
Mon, 10 Nov 2014 22:12:28 +0000 (09:12 +1100)
committerJiri Slaby <jslaby@suse.cz>
Mon, 26 Jan 2015 13:38:43 +0000 (14:38 +0100)
commitc6fdf6dc5e74d008ca8db8c4f7a579a94186c85f
tree92858394554f304176ca2927daf6e6c47de1c9dc
parente3ab75edf0292a413a45448b993775ba4cc4dbd9
powerpc: Fix bad NULL pointer check in udbg_uart_getc_poll()

commit cd32e2dcc9de6c27ecbbfc0e2079fb64b42bad5f upstream.

We have some code in udbg_uart_getc_poll() that tries to protect
against a NULL udbg_uart_in, but gets it all wrong.

Found with the LLVM static analyzer (scan-build).

Fixes: 309257484cc1 ("powerpc: Cleanup udbg_16550 and add support for LPC PIO-only UARTs")
Signed-off-by: Anton Blanchard <anton@samba.org>
[mpe: Add some newlines for readability while we're here]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/powerpc/kernel/udbg_16550.c