From: Dan Carpenter Date: Thu, 23 Aug 2018 13:59:25 +0000 (+0300) Subject: PM / clk: signedness bug in of_pm_clk_add_clks() X-Git-Tag: MMI-QSB30.62-17~983^2~73^2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2a97eba0c4ee31435a4174ffa3818e26d8ee9ac;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git PM / clk: signedness bug in of_pm_clk_add_clks() commit 5e2e2f9f76e157063a656351728703cb02b068f1 upstream. "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) Cc: 4.6+ # 4.6+ Signed-off-by: Dan Carpenter Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- 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)