[PATCH net] net: ti: icssg_prueth: Fix NULL pointer dereference in prueth_probe()

MD Danish Anwar danishanwar at ti.com
Tue May 21 22:50:52 PDT 2024



On 21/05/24 6:14 pm, Romain Gantois wrote:
> In the prueth_probe() function, if one of the calls to emac_phy_connect()
> fails due to of_phy_connect() returning NULL, then the subsequent call to
> phy_attached_info() will dereference a NULL pointer.
> 
> Check the return code of emac_phy_connect and fail cleanly if there is an
> error.
> 
> Fixes: 128d5874c082 ("net: ti: icssg-prueth: Add ICSSG ethernet driver")
> Cc: stable at vger.kernel.org
> Signed-off-by: Romain Gantois <romain.gantois at bootlin.com>

Reviewed-by: MD Danish Anwar <danishanwar at ti.com>


-- 
Thanks and Regards,
Danish



More information about the linux-arm-kernel mailing list