[PATCH][RFC] ASoC: rsnd: don't call clk_disable_unprepare() if can't use
Mark Brown
broonie at kernel.org
Tue Dec 15 14:00:21 CET 2020
On Tue, Dec 15, 2020 at 09:06:05AM +0900, Kuninori Morimoto wrote:
> - adg->clk_rate[i] = clk_get_rate(adg->clk[i]);
> + if (ret < 0)
> + dev_warn(dev, "can't use clk %d\n", i);
> + else
> + adg->clk_rate[i] = clk_get_rate(adg->clk[i]);
We never reset adg->clk_rate[i] so if we use the clock once then get an
error attempting to use it again...
> } else {
> - clk_disable_unprepare(clk);
> + if (adg->clk_rate[i])
> + clk_disable_unprepare(clk);
...we'll try to disable twice. This was already an issue of course, not
something introduced in this patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20201215/e17360db/attachment.sig>
More information about the Alsa-devel
mailing list