]> git.baikalelectronics.ru Git - 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)
commit79cb0719e35c5e7cccc86279cc8afc0dba5096fa
tree3aa73b386c11218908435cf9d27521fd56a48b7e
parent32a68a3845635f0912f482b1fdb8bb4a2fc9b976
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