serial: mpc52xx_uart: fix null pointer dereference

Commit 6acc683351
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>
This commit is contained in:
Anatolij Gustschin 2010-05-05 00:18:59 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель cea0d767c2
Коммит e6114fa1d1
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;