IPMI: Fix platform.cec_reboot() null ptr checks

Message ID 20171206001233.28188-1-mikey@neuling.org
State New
Headers show
Series
  • IPMI: Fix platform.cec_reboot() null ptr checks
Related show

Commit Message

Michael Neuling Dec. 6, 2017, 12:12 a.m.
Kudos to Hugo Landau who reported this in:
  https://github.com/open-power/skiboot/issues/142

Reported-by: Hugo Landau <hlandau@devever.net>
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 hw/ipmi/ipmi-attn.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/ipmi/ipmi-attn.c b/hw/ipmi/ipmi-attn.c
index ef7153ed7c..8ff872c626 100644
--- a/hw/ipmi/ipmi-attn.c
+++ b/hw/ipmi/ipmi-attn.c
@@ -67,7 +67,7 @@  void __attribute__((noreturn)) ipmi_terminate(const char *msg)
 {
 	/* Terminate called before initializing IPMI (early abort) */
 	if (!ipmi_present()) {
-		if (platform.cec_reboot())
+		if (platform.cec_reboot)
 			platform.cec_reboot();
 		goto out;
 	}
@@ -76,7 +76,7 @@  void __attribute__((noreturn)) ipmi_terminate(const char *msg)
 	ipmi_log_terminate_event(msg);
 
 	/* Reboot call */
-	if (platform.cec_reboot())
+	if (platform.cec_reboot)
 		platform.cec_reboot();
 
 out: