Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a89e012 authored by Dan Carpenter's avatar Dan Carpenter Committed by Viresh Kumar
Browse files

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: a1e8c136 ("PM / OPP: "opp-hz" is optional for power domains")
[ Viresh: Added the Fixes tag ]
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 28fa4aca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ static int _opp_add_static_v2(struct opp_table *opp_table, struct device *dev,
			      struct device_node *np)
{
	struct dev_pm_opp *new_opp;
	u64 rate;
	u64 rate = 0;
	u32 val;
	int ret;
	bool rate_not_available = false;