Re: [PATCH net 3/5] net: dsa: mt7530: register the GPIO controller last in setup

From
Andrew Lunn <andrew@lunn.ch>
Date
2026-11-24 18:38:25
Also in
linux-mediatek, lkml, netdev
Reply to
Haoran Wang, 2026-11-24
On Tue, Nov 24, 2026 at 04:25:57PM +0800, Haoran Wang wrote:
mt7530_setup_gpio() publishes a GPIO controller that userspace and other
drivers can use immediately, but it currently runs before the FDB flush,
which is the last step of setup that can fail.

Move the GPIO controller registration after the FDB flush so that the
controller is only made visible once every fallible step, including the
FDB flush, has succeeded. This becomes important in the next patch, where
the failure paths disable the regulators and return an error, so the
controller must not be registered across a failed setup.

Signed-off-by: Haoran Wang <redacted>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Thread (15 messages) 15 messages, 4 authors, last reply 1d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help