Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9414d362 authored by Ralf Baechle's avatar Ralf Baechle
Browse files

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


    
Several boards don't initialize the pointers, so let's play safe.
    
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent a3305a88
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -23,16 +23,18 @@ void (*_machine_power_off)(void);

void machine_restart(char *command)
{
	if (_machine_restart)
		_machine_restart(command);
}

void machine_halt(void)
{
	if (_machine_halt)
		_machine_halt();
}

void machine_power_off(void)
{
	if (_machine_power_off)
		_machine_power_off();
}