提交 9414d362 编写于 作者: R Ralf Baechle

[MIPS] Check function pointers are non-zero before calling.

    
Several boards don't initialize the pointers, so let's play safe.
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 a3305a88
......@@ -23,16 +23,18 @@ void (*_machine_power_off)(void);
void machine_restart(char *command)
{
_machine_restart(command);
if (_machine_restart)
_machine_restart(command);
}
void machine_halt(void)
{
_machine_halt();
if (_machine_halt)
_machine_halt();
}
void machine_power_off(void)
{
_machine_power_off();
if (_machine_power_off)
_machine_power_off();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册