linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] clk: remove redundant negative index check in of_clk_get_parent_name()
@ 2015-11-20  7:36 Masahiro Yamada
  2015-11-20  7:36 ` [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Masahiro Yamada @ 2015-11-20  7:36 UTC (permalink / raw)
  To: linux-clk; +Cc: Masahiro Yamada, Stephen Boyd, Michael Turquette, linux-kernel

This if-block can be dropped because the of_parse_phandle_with_args()
in the following line returns -EINVAL for negative index.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/clk/clk.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 764aca2..20d8e07 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -3062,9 +3062,6 @@ const char *of_clk_get_parent_name(struct device_node *np, int index)
 	int count;
 	struct clk *clk;
 
-	if (index < 0)
-		return NULL;
-
 	rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index,
 					&clkspec);
 	if (rc)
-- 
1.9.1


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

end of thread, other threads:[~2015-12-01  1:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-20  7:36 [PATCH 1/3] clk: remove redundant negative index check in of_clk_get_parent_name() Masahiro Yamada
2015-11-20  7:36 ` [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices Masahiro Yamada
2015-11-20 17:45   ` Stephen Boyd
2015-11-22  6:03     ` Masahiro Yamada
2015-11-24  0:53       ` Stephen Boyd
2015-11-30  8:34         ` Masahiro Yamada
2015-12-01  0:44           ` Stephen Boyd
2015-11-20  7:36 ` [PATCH 3/3] clk: split of_clk_get_parent_name() into two functions Masahiro Yamada
2015-11-21  0:37   ` Stephen Boyd
2015-11-22  5:44     ` Masahiro Yamada
2015-11-24  4:25       ` Masahiro Yamada
2015-12-01  0:49         ` Stephen Boyd
2015-12-01  1:51           ` Masahiro Yamada
2015-11-20 17:18 ` [PATCH 1/3] clk: remove redundant negative index check in of_clk_get_parent_name() 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).