[lvc-project] [PATCH] net: dsa: add return value check of genphy_read_status()

Florian Fainelli f.fainelli at gmail.com
Thu Mar 21 02:48:31 MSK 2024



On 15/03/2024 03:25, Александра Дюпина wrote:
> Hello, Andrew!

(please do not top-post)

> 
> The dsa_register_switch() function is used in various DSA
> drivers (in probe function), so it is necessary to check all
> possible errors. If the return value (may be an error code)
> of genphy_read_status() is not checked in
> dsa_shared_port_fixed_link_register_of(), a possible error
> in dsa_register_switch() may be missed.

This is not a path that will fail, because the fixed PHY emulation layer 
is not a real piece of hardware, therefore no MDIO read could really 
cause a problem here. I don't have a strong opinion however if you want 
to propagate it properly.
-- 
Florian



More information about the lvc-project mailing list