[Skiboot] [PATCH] [lpc] Fix locking
Ananth N Mavinakayanahalli
ananth at in.ibm.com
Tue Jun 16 20:52:46 AEST 2015
Release lock before bailing out.
Signed-off-by: Ananth N Mavinakayanahalli <ananth at in.ibm.com>
---
hw/lpc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/lpc.c b/hw/lpc.c
index b287020..da1e56d 100644
--- a/hw/lpc.c
+++ b/hw/lpc.c
@@ -343,10 +343,9 @@ static int64_t __lpc_write(uint32_t chip_id, enum OpalLPCAddressType addr_type,
/* Perform OPB access */
rc = opb_write(chip, opb_base + addr, data, sz);
- unlock(&chip->lpc_lock);
-
/* XXX Add LPC error handling/recovery */
bail:
+ unlock(&chip->lpc_lock);
return rc;
}
More information about the Skiboot
mailing list