From: Boris BREZILLON Date: Tue, 2 Sep 2014 15:27:51 +0000 (+0200) Subject: clk: at91: fix num_parents test in at91sam9260 slow clk implementation X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e8531ac8b21a3e89db8729d2cd9de43b09818092;p=linux-beck.git clk: at91: fix num_parents test in at91sam9260 slow clk implementation The slow clk block provided by at91sam9260 and derived SoCs should always have 2 parents. Signed-off-by: Boris BREZILLON Signed-off-by: Mike Turquette --- diff --git a/drivers/clk/at91/clk-slow.c b/drivers/clk/at91/clk-slow.c index 0300c46ee247..32f7c1b36204 100644 --- a/drivers/clk/at91/clk-slow.c +++ b/drivers/clk/at91/clk-slow.c @@ -447,7 +447,7 @@ void __init of_at91sam9260_clk_slow_setup(struct device_node *np, int i; num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells"); - if (num_parents <= 0 || num_parents > 1) + if (num_parents != 2) return; for (i = 0; i < num_parents; ++i) {