Re: [PATCH net 4/5] net: dsa: mt7530: disable regulators on setup failure

From
Andrew Lunn <andrew@lunn.ch>
Date
2026-11-24 18:42:48
Also in
linux-arm-kernel, linux-mediatek, lkml
Reply to
Haoran Wang, 2026-11-24
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 <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