clk: h8300: Fix signness bug
authorAxel Lin <axel.lin@ingics.com>
Sat, 20 Jun 2015 07:27:03 +0000 (15:27 +0800)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 28 Jul 2015 18:53:20 +0000 (11:53 -0700)
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 <axel.lin@ingics.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/h8300/clk-div.c
drivers/clk/h8300/clk-h8s2678.c

index 56f9eba91b838d3b855678f70e6a2249cd8d67c6..e13d5c33a887b56bc1ef8c82e0b50d17d1d45a89 100644 (file)
@@ -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;
index 11808cb4f1419c6f32dbe19aea300a6f0efaff51..46e16f22b38f440fc304ce231d73cd9dbaae4c2a 100644 (file)
@@ -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;