[Skiboot] [TRIVIAL PATCH] hw/chiptod: Refactor code to remove goto label
Kamalesh Babulal
kamalesh at linux.vnet.ibm.com
Tue Jul 14 18:16:36 AEST 2015
Refactor _chiptod_get_chip_status(), to remove goto
label.
Signed-off-by: Kamalesh Babulal <kamalesh at linux.vnet.ibm.com>
Cc: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
---
hw/chiptod.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/chiptod.c b/hw/chiptod.c
index bae4b50..c46333d 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;
}
--
2.1.2
More information about the Skiboot
mailing list