Re: [PATCH net-next 2/4] net: ethernet: ti: am65-cpsw: streamline .probe() error handling

From: Jakub Kicinski
Date: Thu Jan 16 2025 - 19:50:10 EST


On Thu, 16 Jan 2025 14:07:40 +0200 Roger Quadros wrote:
> Another motivation for doing so was this paragraph found in
> Documentation/process/maintainer-netdev.rst:
>
> |Netdev remains skeptical about promises of all "auto-cleanup" APIs,
> |including even ``devm_`` helpers, historically. They are not the preferred
> |style of implementation, merely an acceptable one.

FWIW, the devm_ part of this is mostly to stop people from posting
"devm_ conversion" patches for some ancient drivers. Most devm_
uses are perfectly fine.

But as you pointed out, if you have to free the resources manually
as well the devm_ scheme becomes a distraction.