From 8c1b1e54faed690261752afcba27c79ce4d3fa10 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Fri, 19 Feb 2016 17:29:17 -0800 Subject: clk: at91: Remove impossible checks for of_clk_get_parent_count() These checks for < 0 are impossible now that of_clk_get_parent_count() returns an unsigned int. Change the checks for == 0 and update the type. Cc: Boris Brezillon Signed-off-by: Stephen Boyd --- drivers/clk/at91/clk-smd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/clk/at91/clk-smd.c') diff --git a/drivers/clk/at91/clk-smd.c b/drivers/clk/at91/clk-smd.c index a7f8501cfa05..f525830ed5a1 100644 --- a/drivers/clk/at91/clk-smd.c +++ b/drivers/clk/at91/clk-smd.c @@ -145,12 +145,12 @@ void __init of_at91sam9x5_clk_smd_setup(struct device_node *np, struct at91_pmc *pmc) { struct clk *clk; - int num_parents; + unsigned int num_parents; const char *parent_names[SMD_SOURCE_MAX]; const char *name = np->name; num_parents = of_clk_get_parent_count(np); - if (num_parents <= 0 || num_parents > SMD_SOURCE_MAX) + if (num_parents == 0 || num_parents > SMD_SOURCE_MAX) return; of_clk_parent_fill(np, parent_names, num_parents); -- cgit v1.2.3-59-g8ed1b