From e84280b691fbf2e5df67f6b67674114e2197ee8b Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 19 Jun 2018 15:32:05 +0100 Subject: [PATCH] ARM: 8776/1: clkdev: Remove duplicated negative index check from __of_clk_get() __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 Reviewed-by: Stephen Boyd Signed-off-by: Russell King --- drivers/clk/clkdev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index 7513411140b69..02fcee2012e05 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -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) -- 2.39.5