Re: [PATCH] ata: ahci_brcm: fix reset refcount leak in brcm_ahci_resume()
From: Niklas Cassel
Date: Thu Jun 04 2026 - 07:36:49 EST
On Thu, Jun 04, 2026 at 12:03:53PM +0200, Niklas Cassel wrote:
(snip)
> The documentation for reset_control, explicitly says not to do this:
> https://github.com/torvalds/linux/blob/v7.1-rc6/drivers/reset/core.c#L365-L366
>
> And in libahci_platform.c, we always do either:
> return reset_control_rearm() or return reset_control_reset():
> https://github.com/torvalds/linux/blob/v7.1-rc6/drivers/ata/libahci_platform.c#L188-L193
I realize that I am stupid...
The code is doing it on two different reset handles.
My comment that the cleanup in brcm_ahci_resume() should match that in
brcm_ahci_resume() probe still stands.
i.e. you should also add a call to:
reset_control_assert(priv->rcdev_ahci);
And you should do it after disabling clocks, just as brcm_ahci_resume().
Kind regards,
Niklas