[Skiboot] [PATCH] occ: Set return variable to correct value
Cyril Bur
cyril.bur at au1.ibm.com
Thu Jun 8 17:30:05 AEST 2017
When entering this section of code rc will be zero. If fsp_mkmsg() fails
the code responsible for printing an error message won't be set.
Resetting rc should allow for the error case to trigger if fsp_mkmsg
fails.
Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
---
hw/occ.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/occ.c b/hw/occ.c
index bc3abc7c..832bf42d 100644
--- a/hw/occ.c
+++ b/hw/occ.c
@@ -1083,6 +1083,7 @@ static void occ_do_load(u8 scope, u32 dbob_id __unused, u32 seq_id)
return;
if (proc_gen == proc_gen_p9) {
+ rc = -ENOMEM;
/* OCC is pre-loaded in P9, so send SUCCESS to FSP */
rsp = fsp_mkmsg(FSP_CMD_LOAD_OCC_STAT, 2, 0, seq_id);
if (rsp)
--
2.13.1
More information about the Skiboot
mailing list