summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-01-17 21:14:01 +0000
committerRalf Baechle <ralf@linux-mips.org>2006-02-07 13:30:22 +0000
commit9414d3628abb646834965b6c23b8e9064729b110 (patch)
tree7169a54a5b8e2aab003b3bcfbe60de5169400edc /arch/mips
parenta3305a8835ed039363822523a3cac24e990083dc (diff)
downloadblackbird-op-linux-9414d3628abb646834965b6c23b8e9064729b110.tar.gz
blackbird-op-linux-9414d3628abb646834965b6c23b8e9064729b110.zip
[MIPS] Check function pointers are non-zero before calling.
Several boards don't initialize the pointers, so let's play safe. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/reset.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c
index ae2ba67b7ef6..a131aa0cbe66 100644
--- a/arch/mips/kernel/reset.c
+++ b/arch/mips/kernel/reset.c
@@ -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();
}
-
OpenPOWER on IntegriCloud