Commit e6114fa1 authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Greg Kroah-Hartman

serial: mpc52xx_uart: fix null pointer dereference

Commit 6acc6833
introduced NULL pointer dereference and kernel crash
on ppc32 machines while booting. Fix this bug now.
Reported-by: default avatarLeonardo Chiquitto <leonardo.lists@gmail.com>
Tested-by: default avatarLeonardo Chiquitto <leonardo.lists@gmail.com>
Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cea0d767
......@@ -1467,7 +1467,7 @@ mpc52xx_uart_init(void)
/*
* Map the PSC FIFO Controller and init if on MPC512x.
*/
if (psc_ops->fifoc_init) {
if (psc_ops && psc_ops->fifoc_init) {
ret = psc_ops->fifoc_init();
if (ret)
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment