summaryrefslogtreecommitdiffstats
path: root/drivers/opp
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2022-08-15 14:44:37 +0200
committerViresh Kumar <viresh.kumar@linaro.org>2022-08-16 07:18:08 +0200
commitd36cb843e456324d6e725f1d8b440c4645a52d0d (patch)
treeb7e37aa14a635263cc3129b108f7e7c5e151d6b7 /drivers/opp
parentLinux 6.0-rc1 (diff)
downloadlinux-d36cb843e456324d6e725f1d8b440c4645a52d0d.tar.xz
linux-d36cb843e456324d6e725f1d8b440c4645a52d0d.zip
OPP: Fix an un-initialized variable usage
smatch complains that 'ret' may be returned un-initialized. Explicitly return 0 if we reach the end of the function (should 'opp_table->clk_count' be 0). Fixes: 8174a3a613af ("OPP: Provide a simple implementation to configure multiple clocks") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp')
-rw-r--r--drivers/opp/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 77d1ba3a4154..e87567dbe99f 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -873,7 +873,7 @@ int dev_pm_opp_config_clks_simple(struct device *dev,
}
}
- return ret;
+ return 0;
}
EXPORT_SYMBOL_GPL(dev_pm_opp_config_clks_simple);