Thread (27 messages) flat view 27 messages, 3 authors, 2026-02-02

Re: [net-next,v2,09/15] net: ftgmac100: Always register the MDIO bus when it exists

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-01-22 13:40:42

I've been thinking about this part. One possible approach is to switch to
devm_mdiobus_alloc() and devm_of_mdiobus_register() instead of
mdiobus_alloc() and of_mdiobus_register().
If i remember correctly, a later patch does that. Which is why this AI
bot points out the problem goes away later in the series.

I was trying to keep the patches simple, do one thing, be obviously
correct. Moving the code and changing to devm_* at the same time is
not "do one thing".

If it is possible to fix the issue by just moving the call to destroy
earlier in the error path, i would do that. That is the logical fix to
this patch. We then have the setup and the cleanup in symmetry.

   Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help