[Skiboot] [PATCH 4/6] FSP/ELOG: Free error log buffer in error path

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Apr 7 22:56:50 AEST 2015


Also pass MBOX return state instead of sending "true" always.

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hw/fsp/fsp-elog-write.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/fsp/fsp-elog-write.c b/hw/fsp/fsp-elog-write.c
index 7496b17..e547cc0 100644
--- a/hw/fsp/fsp-elog-write.c
+++ b/hw/fsp/fsp-elog-write.c
@@ -305,6 +305,7 @@ static int opal_push_logs_sync_to_fsp(struct errorlog *buf)
 		prerror("ELOG: PLID: 0x%x Failed to create message for WRITE "
 							"to FSP\n", buf->plid);
 		unlock(&elog_panic_write_lock);
+		opal_elog_complete(buf, false);
 		return OPAL_INTERNAL_ERROR;
 	}
 
@@ -317,7 +318,10 @@ static int opal_push_logs_sync_to_fsp(struct errorlog *buf)
 	}
 	unlock(&elog_panic_write_lock);
 
-	opal_elog_complete(buf, true);
+	if (rc != OPAL_SUCCESS)
+		opal_elog_complete(buf, false);
+	else
+		opal_elog_complete(buf, true);
 	return rc;
 }
 



More information about the Skiboot mailing list