]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: clean up get_phy_c22_id() invalid ID handling
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 18 Jun 2020 13:45:48 +0000 (14:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Jun 2020 03:17:15 +0000 (20:17 -0700)
commit71324a3780ba3f7df879dcdb57b6e4b16305f558
tree378cdb6193a0fdbb123d047db023d322c48c3719
parent4109778fbb52fb80e53a64f61363027c99ba4edb
net: phy: clean up get_phy_c22_id() invalid ID handling

Move the ID check from get_phy_device() into get_phy_c22_id(), which
simplifies get_phy_device(). The ID reading functions are now
responsible for indicating whether they found a PHY or not via their
return code - they must return -ENODEV when a PHY is not present.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c