[PATCH v3 2/2] bus: ti-sysc: sysc_check_children(): Change return type to void

From: Nishka Dasgupta
Date: Tue Aug 13 2019 - 03:56:17 EST


Change return type of function sysc_check_children() from int to void as
it always returns 0. Remove its return statement as well.
At call site, remove the variable that was used to store the return
value, as well as the check on the return value.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@xxxxxxxxx>
---
- This is a new patch; labelled v3 only because it is in the same series
as the previous patch.

drivers/bus/ti-sysc.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 9c6d3e121d37..a2eae8f36ef8 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -628,14 +628,12 @@ static void sysc_check_one_child(struct sysc *ddata,
sysc_parse_dts_quirks(ddata, np, true);
}

-static int sysc_check_children(struct sysc *ddata)
+static void sysc_check_children(struct sysc *ddata)
{
struct device_node *child;

for_each_child_of_node(ddata->dev->of_node, child)
sysc_check_one_child(ddata, child);
-
- return 0;
}

/*
@@ -788,9 +786,7 @@ static int sysc_map_and_check_registers(struct sysc *ddata)
if (error)
return error;

- error = sysc_check_children(ddata);
- if (error)
- return error;
+ sysc_check_children(ddata);

error = sysc_parse_registers(ddata);
if (error)
--
2.19.1