From 6a89e012aaf4a978d4c896f3299cfc365e4a5eb8 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 16 May 2018 12:52:41 +0300 Subject: 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 Signed-off-by: Viresh Kumar --- drivers/opp/of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/opp/of.c') 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, struct device_node *np) { struct dev_pm_opp *new_opp; - u64 rate; + u64 rate = 0; u32 val; int ret; bool rate_not_available = false; -- cgit v1.2.3