Skip to content

Commit

Permalink
clk: remove redundant negative index check in of_clk_get_parent_name()
Browse files Browse the repository at this point in the history
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: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
  • Loading branch information
Masahiro Yamada authored and Stephen Boyd committed Nov 20, 2015
1 parent 59fe663 commit c736c4e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3062,9 +3062,6 @@ const char *of_clk_get_parent_name(struct device_node *np, int index)
int count;
struct clk *clk;

if (index < 0)
return NULL;

rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index,
&clkspec);
if (rc)
Expand Down

0 comments on commit c736c4e

Please sign in to comment.