Re: [PATCH net 2/4] net: dsa: mt7530: check bus->read() error in core_rmw()

Andrew Lunn <[email protected]> Thu, 30 Jul 2026 18:15:10 +0200
Newsgroups org.infradead.lists.linux-mediatek,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
On Thu, Jul 30, 2026 at 05:03:17PM +0100, Daniel Golle wrote:
> core_rmw() accesses the MMD core registers directly rather than
> through the regmap and has the same unchecked bus->read() as the
> one just fixed in the MDIO regmap backend: a negative errno is
> consumed as register data, modified and written back to the switch.
> Check the read and bail out like the surrounding bus accesses do.
> 
> Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
> Signed-off-by: Daniel Golle <[email protected]>

Reviewed-by: Andrew Lunn <[email protected]>

    Andrew