diff options
author | Ananth N Mavinakayanahalli <ananth@in.ibm.com> | 2015-06-16 16:26:12 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-06-19 07:37:36 +1000 |
commit | c8d15a5d13cea5a7b2d6a6ee634dfd17c83c8c13 (patch) | |
tree | 571993abf6e305d784e5783e34e26336f26a27ef /hw/lpc.c | |
parent | 7ae068e86cce5bb44ff5d66c430df972dafb34e3 (diff) | |
download | skiboot-c8d15a5d13cea5a7b2d6a6ee634dfd17c83c8c13.zip skiboot-c8d15a5d13cea5a7b2d6a6ee634dfd17c83c8c13.tar.gz skiboot-c8d15a5d13cea5a7b2d6a6ee634dfd17c83c8c13.tar.bz2 |
Fix locking
Release lock before bailing out.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
V2: Handle the 2nd instance of the same issue in the file.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/lpc.c')
-rw-r--r-- | hw/lpc.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; } @@ -403,10 +402,9 @@ static int64_t __lpc_read(uint32_t chip_id, enum OpalLPCAddressType addr_type, /* Perform OPB access */ rc = opb_read(chip, opb_base + addr, data, sz); - unlock(&chip->lpc_lock); - /* XXX Add LPC error handling/recovery */ bail: + unlock(&chip->lpc_lock); return rc; } |