فهرست منبع

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 bd69f73f2c81eed9 ("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>
Geert Uytterhoeven 7 سال پیش
والد
کامیت
76672e2e5b
1فایلهای تغییر یافته به همراه0 افزوده شده و 3 حذف شده
  1. 0 3
      drivers/clk/clkdev.c

+ 0 - 3
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)