[PATCH 22/30] staging: unisys: Remove unnecessary gotos from info_debugfs_read_helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Get rid of all the useless gotos in info_debugfs_read_helper() and just
return the correct values straight away.

Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
---
 drivers/staging/unisys/uislib/uislib.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index a5d25c8..f0abb92 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -1103,7 +1103,7 @@ info_debugfs_read_helper(char **buff, int *buff_len)
 	struct bus_info *bus;
 
 	if (PLINE("\nBuses:\n") < 0)
-		goto err_done;
+		return -1;
 
 	read_lock(&bus_list_lock);
 	for (bus = bus_list; bus; bus = bus->next) {
@@ -1134,23 +1134,22 @@ info_debugfs_read_helper(char **buff, int *buff_len)
 
 	if (PLINE("UisUtils_Registered_Services: %d\n",
 		  atomic_read(&uisutils_registered_services)) < 0)
-		goto err_done;
+		return -1;
 	if (PLINE("cycles_before_wait %llu wait_cycles:%llu\n",
 		  cycles_before_wait, wait_cycles) < 0)
-			goto err_done;
+			return -1;
 	if (PLINE("tot_wakeup_cnt %llu:tot_wait_cnt %llu:tot_schedule_cnt %llu\n",
 		  tot_wakeup_cnt, tot_wait_cnt, tot_schedule_cnt) < 0)
-			goto err_done;
+			return -1;
 	if (PLINE("en_smart_wakeup %d\n", en_smart_wakeup) < 0)
-			goto err_done;
+			return -1;
 	if (PLINE("tot_moved_to_tail_cnt %llu\n", tot_moved_to_tail_cnt) < 0)
-			goto err_done;
+			return -1;
 
 	return tot;
 
 err_done_unlock:
 	read_unlock(&bus_list_lock);
-err_done:
 	return -1;
 }
 
-- 
2.1.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux