[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f1f2746c-15e1-4d97-87d2-ed2e20e56cb0@lunn.ch>
Date: Fri, 31 Oct 2025 17:32:12 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Alok Tiwari <alok.a.tiwari@...cle.com>
Cc: ansuelsmth@...il.com, hkallweit1@...il.com, kuba@...nel.org,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
horms@...nel.org, netdev@...r.kernel.org,
alok.a.tiwarilinux@...il.com
Subject: Re: [PATCH net] net: mdio: Check regmap pointer returned by
device_node_to_regmap()
On Fri, Oct 31, 2025 at 09:15:53AM -0700, Alok Tiwari wrote:
> The call to device_node_to_regmap() in airoha_mdio_probe() can return
> an ERR_PTR() if regmap initialization fails. Currently, the driver
> stores the pointer without validation, which could lead to a crash
> if it is later dereferenced.
>
> Add an IS_ERR() check and return the corresponding error code to make
> the probe path more robust.
>
> Fixes: 67e3ba978361 ("net: mdio: Add MDIO bus controller for Airoha AN7583")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@...cle.com>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists