aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamalesh Babulal <kamalesh@linux.vnet.ibm.com>2015-07-14 13:46:36 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-08-13 17:05:22 +1000
commit4f689d964edb0cba34e5fff038f5ec4c184e0249 (patch)
treee1c3058069ea5ee2387e77b168470f196484e9a0
parent9090f1aa75db0dfa91c2cc0fde6aa5a8078a5b89 (diff)
downloadskiboot-4f689d964edb0cba34e5fff038f5ec4c184e0249.zip
skiboot-4f689d964edb0cba34e5fff038f5ec4c184e0249.tar.gz
skiboot-4f689d964edb0cba34e5fff038f5ec4c184e0249.tar.bz2
hw/chiptod: Refactor code to remove goto label
Refactor _chiptod_get_chip_status(), to remove goto label. Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/chiptod.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/chiptod.c b/hw/chiptod.c
index 69e05d9..88f6c8e 100644
--- a/hw/chiptod.c
+++ b/hw/chiptod.c
@@ -452,7 +452,7 @@ static enum chiptod_chip_status _chiptod_get_chip_status(int32_t chip_id)
if (xscom_read(chip_id, TOD_STATUS, &tod_status) != 0) {
prerror("CHIPTOD: XSCOM error reading TOD_STATUS reg\n");
- goto out;
+ return status;
}
if (tod_status & TOD_ST_ACTIVE_MASTER)
@@ -460,7 +460,6 @@ static enum chiptod_chip_status _chiptod_get_chip_status(int32_t chip_id)
else if (tod_status & TOD_ST_BACKUP_MASTER)
status = chiptod_backup_master;
-out:
return status;
}