]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ARM: 8776/1: clkdev: Remove duplicated negative index check from __of_clk_get()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 19 Jun 2018 14:32:05 +0000 (15:32 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Wed, 11 Jul 2018 10:02:48 +0000 (11:02 +0100)
__of_clk_get() calls of_parse_phandle_with_args(), which rejects
negative indices since commit 527d8d05256b255d ("of: Create function for
counting number of phandles in a property").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
drivers/clk/clkdev.c

index 7513411140b693ecdb1d4c825de69e0e9e679d15..02fcee2012e0525089e3f2be83e234e88166f019 100644 (file)
@@ -35,9 +35,6 @@ static struct clk *__of_clk_get(struct device_node *np, int index,
        struct clk *clk;
        int rc;
 
-       if (index < 0)
-               return ERR_PTR(-EINVAL);
-
        rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index,
                                        &clkspec);
        if (rc)