[PATCH net 1/4] net: pcs: mtk-lynxi: check regmap reads in mtk_pcs_lynxi_get_state()
Andrew Lunn
andrew at lunn.ch
Thu Jul 30 09:13:13 PDT 2026
On Thu, Jul 30, 2026 at 05:03:11PM +0100, Daniel Golle wrote:
> mtk_pcs_lynxi_get_state() ignores regmap_read()'s return value; a
> failed read leaves bm and adv holding uninitialized stack values
> which are then decoded into the reported link state. The regmaps
> backing the MT7531 SGMII PCS instances sit on an MDIO bus where
> reads can fail. Check both reads and leave the state untouched on
> error.
>
> Fixes: 4765a9722e09 ("net: pcs: add driver for MediaTek SGMII PCS")
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
Reviewed-by: Andrew Lunn <andrew at lunn.ch>
Andrew
More information about the Linux-mediatek
mailing list