[PATCH net-next] net: ethernet: ti: am65-cpsw: Handle -EPROBE_DEFER for Serdes PHY

Roger Quadros rogerq at kernel.org
Thu Jan 19 02:30:21 PST 2023



On 18/01/2023 13:21, Siddharth Vadapalli wrote:
> In the am65_cpsw_init_serdes_phy() function, the error handling for the
> call to the devm_of_phy_get() function misses the case where the return
> value of devm_of_phy_get() is ERR_PTR(-EPROBE_DEFER). Proceeding without
> handling this case will result in a crash when the "phy" pointer with
> this value is dereferenced by phy_init() in am65_cpsw_enable_phy().
> 
> Fix this by adding appropriate error handling code.
> 
> Reported-by: Geert Uytterhoeven <geert at linux-m68k.org>
> Fixes: dab2b265dd23 ("net: ethernet: ti: am65-cpsw: Add support for SERDES configuration")
> Suggested-by: Geert Uytterhoeven <geert at linux-m68k.org>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli at ti.com>

Reviewed-by: Roger Quadros <rogerq at kernel.org>



More information about the linux-arm-kernel mailing list