From e306479ac252928b84cc563c6e790f9b7e7ae427 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 20 Jun 2015 15:27:03 +0800 Subject: [PATCH] clk: h8300: Fix signness bug of_clk_get_parent_count() may return negative error code, so num_parents needs to be int rather than unsigned int. Signed-off-by: Axel Lin Signed-off-by: Stephen Boyd --- drivers/clk/h8300/clk-div.c | 2 +- drivers/clk/h8300/clk-h8s2678.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/h8300/clk-div.c b/drivers/clk/h8300/clk-div.c index 56f9eba91b83..e13d5c33a887 100644 --- a/drivers/clk/h8300/clk-div.c +++ b/drivers/clk/h8300/clk-div.c @@ -15,7 +15,7 @@ static DEFINE_SPINLOCK(clklock); static void __init h8300_div_clk_setup(struct device_node *node) { - unsigned int num_parents; + int num_parents; struct clk *clk; const char *clk_name = node->name; const char *parent_name; diff --git a/drivers/clk/h8300/clk-h8s2678.c b/drivers/clk/h8300/clk-h8s2678.c index 11808cb4f141..46e16f22b38f 100644 --- a/drivers/clk/h8300/clk-h8s2678.c +++ b/drivers/clk/h8300/clk-h8s2678.c @@ -84,7 +84,7 @@ static const struct clk_ops pll_ops = { static void __init h8s2678_pll_clk_setup(struct device_node *node) { - unsigned int num_parents; + int num_parents; struct clk *clk; const char *clk_name = node->name; const char *parent_name; -- 2.30.2