diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-05-16 05:52:41 -0400 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2018-05-16 05:55:44 -0400 |
commit | 6a89e012aaf4a978d4c896f3299cfc365e4a5eb8 (patch) | |
tree | e33cebfbdd08c012a4295a737b9d4b4751419e89 | |
parent | 28fa4aca262ce0865d27788ebc480e643117d7ab (diff) |
PM / OPP: silence an uninitialized variable warning
Smatch complains that it's possible we print "rate" in the debug output
when it hasn't been initialized. It should be zero on that path.
Fixes: a1e8c13600bf ("PM / OPP: "opp-hz" is optional for power domains")
[ Viresh: Added the Fixes tag ]
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rw-r--r-- | drivers/opp/of.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 7026e9f484ea..6d15f05bfc28 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c | |||
@@ -287,7 +287,7 @@ static int _opp_add_static_v2(struct opp_table *opp_table, struct device *dev, | |||
287 | struct device_node *np) | 287 | struct device_node *np) |
288 | { | 288 | { |
289 | struct dev_pm_opp *new_opp; | 289 | struct dev_pm_opp *new_opp; |
290 | u64 rate; | 290 | u64 rate = 0; |
291 | u32 val; | 291 | u32 val; |
292 | int ret; | 292 | int ret; |
293 | bool rate_not_available = false; | 293 | bool rate_not_available = false; |