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

Andrew Lunn andrew at lunn.ch
Tue Nov 24 10:38:08 PST 2026


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 <wanghr2026 at mail.zgclab.edu.cn>

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew



More information about the linux-arm-kernel mailing list