Skip to content

Commit

Permalink
OPP: Fix an un-initialized variable usage
Browse files Browse the repository at this point in the history
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: 8174a3a ("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>
  • Loading branch information
Christophe JAILLET authored and Viresh Kumar committed Aug 16, 2022
1 parent 568035b commit d36cb84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/opp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit d36cb84

Please sign in to comment.