OPP: Fix an un-initialized variable usage
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 15 Aug 2022 12:44:37 +0000 (14:44 +0200)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 16 Aug 2022 05:18:08 +0000 (10:48 +0530)
commitd36cb843e456324d6e725f1d8b440c4645a52d0d
treeb7e37aa14a635263cc3129b108f7e7c5e151d6b7
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868
OPP: Fix an un-initialized variable usage

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: 8174a3a613af ("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>
drivers/opp/core.c