linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clkdev: Remove duplicated negative index check from __of_clk_get()
@ 2018-05-18 10:58 Geert Uytterhoeven
  2018-06-01 19:20 ` Stephen Boyd
  2018-06-29 17:18 ` Stephen Boyd
  0 siblings, 2 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2018-05-18 10:58 UTC (permalink / raw)
  To: linux-arm-kernel

__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>
---
Commit bd69f73f2c81eed9 is in v3.9.
---
 drivers/clk/clkdev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 7513411140b693ec..02fcee2012e05250 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.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-06-29 17:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-18 10:58 [PATCH] clkdev: Remove duplicated negative index check from __of_clk_get() Geert Uytterhoeven
2018-06-01 19:20 ` Stephen Boyd
2018-06-01 19:22   ` Geert Uytterhoeven
2018-06-02  4:47     ` Stephen Boyd
2018-06-02  9:41       ` Geert Uytterhoeven
2018-06-29 17:18 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).