From: Masahiro Yamada Date: Fri, 20 Nov 2015 07:36:19 +0000 (+0900) Subject: clk: remove redundant negative index check in of_clk_get_parent_name() X-Git-Tag: v4.5-rc1~82^2~14^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c736c4e11e9def555482f3f626254594d3f11f9c;p=thirdparty%2Flinux.git 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: Masahiro Yamada Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index f13c3f4228d4d..7429edebbe689 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -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)