PATCH v2] PM / OPP: silence an uninitialized variable warning
Subsystems (2)
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.
Signed-off-by Dan Carpenter <[email protected]>
---
v2: fix it a different way
drivers/opp/of.c +1 -1
@@ -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;
Quoted 12 lines · Dan Carpenter
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.
Signed-off-by Dan Carpenter <[email protected]>---
v2: fix it a different waydrivers/opp/of.c +0
-0
drivers/opp/of.c static int _opp_add_static_v2(struct opp_table *opp_table, struct device *dev, · line 293
Quoted 8 lines
drivers/opp/of.c +1
-1@@ -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;
Applied and added the Fixes tag as well.
Signature · 1 line
viresh