summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorMasahiro Yamada2015-11-20 08:36:19 +0100
committerStephen Boyd2015-11-20 18:18:24 +0100
commitc736c4e11e9def555482f3f626254594d3f11f9c (patch)
treee9360b50029da1384bb20afbb032f4bb8450c56e /drivers/clk/clk.c
parentclk: versatile: remove unneeded error message (diff)
downloadkernel-qcow2-linux-c736c4e11e9def555482f3f626254594d3f11f9c.tar.gz
kernel-qcow2-linux-c736c4e11e9def555482f3f626254594d3f11f9c.tar.xz
kernel-qcow2-linux-c736c4e11e9def555482f3f626254594d3f11f9c.zip
clk: remove redundant negative index check in of_clk_get_parent_name()
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> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index f13c3f4228d4..7429edebbe68 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)