]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: phy: clean up get_phy_c45_ids() failure handling
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 18 Jun 2020 13:45:43 +0000 (14:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Jun 2020 03:17:14 +0000 (20:17 -0700)
commit48c543887bc528451e3a64c503ae82386520c686
tree3aa73b386c11218908435cf9d27521fd56a48b7e
parente63062616df323cee4266ed3f964e20e00092d9a
net: phy: clean up get_phy_c45_ids() failure handling

When we decide that a PHY is not present, we do not need to go through
the hoops of setting *phy_id to 0xffffffff, and then return zero to
make get_phy_device() fail - we can return -ENODEV which will have the
same effect.

Doing so means we no longer have to pass a pointer to phy_id in, and
we can then clean up the clause 22 path in a similar way.

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