Re: [PATCH net 4/5] net: dsa: mt7530: disable regulators on setup failure
From: Andrew Lunn
Date: Tue Nov 24 2026 - 13:42:56 EST
On Tue, Nov 24, 2026 at 04:25:57PM +0800, Haoran Wang wrote:
> Once the core and io regulators have been enabled, every later failure
> in mt7530_setup() returned without disabling them, leaving the rails
> enabled and making the regulator core warn when devres later puts an
> enabled regulator.
>
> Route those failure paths to a common error label that disables both
> regulators, and disable the already enabled core regulator if enabling
> the io regulator fails.
>
> Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
> Signed-off-by: Haoran Wang <wanghr2026@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew