[PATCH net-next v4 1/7] net: axienet: Fix resource release ordering

Sean Anderson sean.anderson at linux.dev
Tue Dec 16 06:48:00 PST 2025


On 12/16/25 06:53, Gupta, Suraj wrote:
> [Public]
> 
> Hi,
>> -----Original Message-----
>> From: Andrew Lunn <andrew at lunn.ch>
>> Sent: Wednesday, August 6, 2025 2:29 AM
>> To: Sean Anderson <sean.anderson at linux.dev>
>> Cc: Pandey, Radhey Shyam <radhey.shyam.pandey at amd.com>; Andrew Lunn
>> <andrew+netdev at lunn.ch>; David S . Miller <davem at davemloft.net>; Eric
>> Dumazet <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>; Paolo
>> Abeni <pabeni at redhat.com>; netdev at vger.kernel.org; linux-arm-
>> kernel at lists.infradead.org; linux-kernel at vger.kernel.org; Greg Kroah-Hartman
>> <gregkh at linuxfoundation.org>; Simek, Michal <michal.simek at amd.com>;
>> Leon Romanovsky <leon at kernel.org>; Gupta, Suraj <Suraj.Gupta2 at amd.com>
>> Subject: Re: [PATCH net-next v4 1/7] net: axienet: Fix resource release ordering
>>
>> Caution: This message originated from an External Source. Use proper caution
>> when opening attachments, clicking links, or responding.
>>
>>
>> > +static void axienet_disable_misc(void *clocks) {
>> > +     clk_bulk_disable_unprepare(XAE_NUM_MISC_CLOCKS, clocks); }
>> > +
>>
>> ...
>>
>> >       ret = devm_clk_bulk_get_optional(&pdev->dev, XAE_NUM_MISC_CLOCKS,
>> lp->misc_clks);
>> >       if (ret)
>> > -             goto cleanup_clk;
>> > +             return dev_err_probe(&pdev->dev, ret,
>> > +                                  "could not get misc. clocks\n");
>> >
>> >       ret = clk_bulk_prepare_enable(XAE_NUM_MISC_CLOCKS, lp->misc_clks);
>> >       if (ret)
>> > -             goto cleanup_clk;
>> > +             return dev_err_probe(&pdev->dev, ret,
>> > +                                  "could not enable misc. clocks\n");
>> > +
>> > +     ret = devm_add_action_or_reset(&pdev->dev, axienet_disable_misc,
>> > +                                    lp->misc_clks);
>>
>> It seems like it would be better to add
>> devm_clk_bulk_get_optional_enable(). There is already an
>> devm_clk_bulk_get_all_enabled() so it does not seem like too big a step.
>>
>>         Andrew
> 
> We are interested in this patch to fix AXI Ethernet probe path and can collaborate on upstreaming it.

Feel free to modify it as suggested by Andrew.

Unfortunately I have not had time to work on this series recently and probably
won't be able to return to it for another few months.

--Sean



More information about the linux-arm-kernel mailing list