提交 e6114fa1 编写于 作者: A Anatolij Gustschin 提交者: 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: NLeonardo Chiquitto <leonardo.lists@gmail.com>
Tested-by: NLeonardo Chiquitto <leonardo.lists@gmail.com>
Signed-off-by: NAnatolij Gustschin <agust@denx.de>
Acked-by: NGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 cea0d767
...@@ -1467,7 +1467,7 @@ mpc52xx_uart_init(void) ...@@ -1467,7 +1467,7 @@ mpc52xx_uart_init(void)
/* /*
* Map the PSC FIFO Controller and init if on MPC512x. * 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(); ret = psc_ops->fifoc_init();
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册