]> git.baikalelectronics.ru Git - kernel.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)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 12 Nov 2014 02:47:20 +0000 (13:47 +1100)
commitba22a04f6bd8289c26348e0cae1d5846c601b2ad
treef53c940f8194f1705a60d4508194ce1160f6a76c
parentc4409efab504012b272084d1e1f806f436222d04
powerpc: Fix bad NULL pointer check in udbg_uart_getc_poll()

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: 046f91a09caf ("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>
arch/powerpc/kernel/udbg_16550.c