Re: [PATCHv2 net-next 03/10] net: lantiq_etop: use devm for register_netdev
From: Andrew Lunn
Date: Tue Oct 01 2024 - 18:48:43 EST
On Tue, Oct 01, 2024 at 11:46:00AM -0700, Rosen Penev wrote:
> This is the last to be created and so must be the first to be freed.
> Simpler to avoid by using devm.
Actually, devm does not enforce that. All it enforces is that
resources controlled via devm are released in reverse order. Things
not using devm will be release first by explicit code.
The only reason devm is safe is that the core ensures the interface is
closed. So the order probably does not matter.
Andrew
---
pw-bot: cr