diff options
author | Yang Li <yang.lee@linux.alibaba.com> | 2021-03-02 12:16:38 +0300 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2021-03-11 19:53:38 +0300 |
commit | 065cac6c686d755e8379ee1e8d00e7c7ba79f49a (patch) | |
tree | b1605ab4aa3cd5214d6aeeb3ecfd3e56b9d801d0 | |
parent | 886db32398aba36937e3a61bc093bf4d859cfaf8 (diff) | |
download | linux-065cac6c686d755e8379ee1e8d00e7c7ba79f49a.tar.xz |
of: property: Remove unneeded return variable
This patch removes unneeded return variables, using only
'0' instead.
It fixes the following warning detected by coccinelle:
./drivers/of/property.c:1371:5-8: Unneeded variable: "ret". Return "0"
on line 1388
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/1614676598-105267-1-git-send-email-yang.lee@linux.alibaba.com
Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r-- | drivers/of/property.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/of/property.c b/drivers/of/property.c index 5036a362f52e..23816959c696 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1368,7 +1368,6 @@ static int of_link_property(struct device_node *con_np, const char *prop_name) const struct supplier_bindings *s = of_supplier_bindings; unsigned int i = 0; bool matched = false; - int ret = 0; /* Do not stop at first failed link, link all available suppliers. */ while (!matched && s->parse_prop) { @@ -1385,7 +1384,7 @@ static int of_link_property(struct device_node *con_np, const char *prop_name) } s++; } - return ret; + return 0; } static int of_fwnode_add_links(struct fwnode_handle *fwnode) |