]> Git Repo - linux.git/commitdiff
ARM: 8776/1: clkdev: Remove duplicated negative index check from __of_clk_get()
authorGeert Uytterhoeven <[email protected]>
Tue, 19 Jun 2018 14:32:05 +0000 (15:32 +0100)
committerRussell King <[email protected]>
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 bd69f73f2c81eed9 ("of: Create function for
counting number of phandles in a property").

Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Russell King <[email protected]>
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)
This page took 0.059704 seconds and 4 git commands to generate.