diff options
author | Anatolij Gustschin <agust@denx.de> | 2010-05-04 18:18:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-13 15:10:55 -0400 |
commit | e6114fa1d1d6a588766f28081b971047dd3e5def (patch) | |
tree | 58abc158d7f3ad52e5071b77c34be6d752848319 /drivers/serial/mpc52xx_uart.c | |
parent | cea0d767c29669bf89f86e4aee46ef462d2ebae8 (diff) |
serial: mpc52xx_uart: fix null pointer dereference
Commit 6acc6833510db8f72b5ef343296d97480555fda9
introduced NULL pointer dereference and kernel crash
on ppc32 machines while booting. Fix this bug now.
Reported-by: Leonardo Chiquitto <leonardo.lists@gmail.com>
Tested-by: Leonardo Chiquitto <leonardo.lists@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/serial/mpc52xx_uart.c')
-rw-r--r-- | drivers/serial/mpc52xx_uart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index a176ab4bd65b..02469c31bf0b 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -1467,7 +1467,7 @@ mpc52xx_uart_init(void) | |||
1467 | /* | 1467 | /* |
1468 | * Map the PSC FIFO Controller and init if on MPC512x. | 1468 | * Map the PSC FIFO Controller and init if on MPC512x. |
1469 | */ | 1469 | */ |
1470 | if (psc_ops->fifoc_init) { | 1470 | if (psc_ops && psc_ops->fifoc_init) { |
1471 | ret = psc_ops->fifoc_init(); | 1471 | ret = psc_ops->fifoc_init(); |
1472 | if (ret) | 1472 | if (ret) |
1473 | return ret; | 1473 | return ret; |