diff mbox series

PM / clk: signedness bug in of_pm_clk_add_clks()

Message ID 20180823135925.6tt64b7tvbmeidiv@kili.mountain (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show
Series PM / clk: signedness bug in of_pm_clk_add_clks() | expand

Commit Message

Dan Carpenter Aug. 23, 2018, 1:59 p.m. UTC
"count" needs to be signed for the error handling to work.  I made "i"
signed as well so they match.

Fixes: 02113ba93ea4 ("PM / clk: Add support for obtaining clocks from device-tree")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff mbox series

Patch

diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
index 8e2e4757adcb..5a42ae4078c2 100644
--- a/drivers/base/power/clock_ops.c
+++ b/drivers/base/power/clock_ops.c
@@ -185,7 +185,7 @@  EXPORT_SYMBOL_GPL(of_pm_clk_add_clk);
 int of_pm_clk_add_clks(struct device *dev)
 {
 	struct clk **clks;
-	unsigned int i, count;
+	int i, count;
 	int ret;
 
 	if (!dev || !dev->of_node)