From 4f689d964edb0cba34e5fff038f5ec4c184e0249 Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Tue, 14 Jul 2015 13:46:36 +0530 Subject: hw/chiptod: Refactor code to remove goto label Refactor _chiptod_get_chip_status(), to remove goto label. Signed-off-by: Kamalesh Babulal Cc: Mahesh Salgaonkar Signed-off-by: Stewart Smith --- hw/chiptod.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw/chiptod.c') 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; } -- cgit v1.1