[Skiboot] [PATCH 05/10] p8-i2c: Ensure request "result" field is updated on completion

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Jun 23 14:25:55 AEST 2015


It may or may not already contain the right error code (it can be
used internally by the state machine to carry the error accross the
recovery state), but in case where it's not, update it.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 hw/p8-i2c.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/p8-i2c.c b/hw/p8-i2c.c
index 3cc01bb..510604a 100644
--- a/hw/p8-i2c.c
+++ b/hw/p8-i2c.c
@@ -390,6 +390,7 @@ static void p8_i2c_complete_request(struct p8_i2c_master *master,
 	cancel_timer_async(&master->timeout);
 	list_del(&req->link);
 	master->state = state_idle;
+	req->result = ret;
 
 	/* Schedule re-enabling of sensor cache */
 	if (master->occ_cache_dis)
-- 
2.1.4



More information about the Skiboot mailing list