Commit c736c4e1 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Stephen Boyd

clk: remove redundant negative index check in of_clk_get_parent_name()

This if-block can be dropped because the of_parse_phandle_with_args()
in the following line returns -EINVAL for negative index.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 59fe6631
...@@ -3062,9 +3062,6 @@ const char *of_clk_get_parent_name(struct device_node *np, int index) ...@@ -3062,9 +3062,6 @@ const char *of_clk_get_parent_name(struct device_node *np, int index)
int count; int count;
struct clk *clk; struct clk *clk;
if (index < 0)
return NULL;
rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index, rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index,
&clkspec); &clkspec);
if (rc) if (rc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment