On 2/26/24 2:49 PM, Sumit Garg wrote:
On Mon, 26 Feb 2024 at 19:06, Marek Vasut <ma...@denx.de> wrote:
On 2/26/24 2:30 PM, Sumit Garg wrote:
On Mon, 26 Feb 2024 at 18:34, Marek Vasut <ma...@denx.de> wrote:
On 2/26/24 1:50 PM, Sumit Garg wrote:
[...]
+ ret = reset_get_by_name(dev, "pciephy", &imx8_phy->reset);
+ if (ret) {
+ dev_err(dev, "Failed to get PCIEPHY reset control\n");
+ return ret;
+ }
Some clk_put() and co. fail path is missing here.
Ditto for clk_put() not being available. However, I can add the fail
path for the other reset.
Oh, maybe reset_free() and clk_release*() then ?
AFAICS, clk_release*() APIs are internally only a wrapper around
clk_disable(). So actually those APIs don't seem to do anything useful
in the fail path here.
However, I will let clock tree maintainers chime in here if they plan
to remove clk_release*() APIs on similar lines as with clk_free().
Maybe they should be in place so in case in the future clock should be
torn down, it wouldn't be necessary to fix so many drivers ?
See the following comparison:
$ git grep -nr clk_get_by_name | wc -l
229
$ git grep -nr clk_release | wc -l
59
There are already many driver instances which don't use clk_release*() APIs.
And that's a good argument to make the situation worse ?