Re: [PATCH net 5/5] net: dsa: mt7530: disable regulators on mt753x_setup() failure

From
Andrew Lunn <andrew@lunn.ch>
Date
2026-11-24 18:51:01
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:
mt753x_setup() calls the per-variant sw_setup() (mt7530_setup() for the
MT7530), which enables the regulators, but the steps that follow returned
on error without disabling them. The common case is mt7530_setup_irq()
returning -EPROBE_DEFER, which leaves the rails on and re-enables them on
every re-probe.

Route all failure paths after sw_setup() to a shared error label that
disables the regulators, and move the mdio irq teardown there instead of
handling it inline.
From an architecture side, this is not great. We have a per-variant
sw_setup() function. To keep things symmetric, there should be a
per-variant sw_teardown() function.

    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