net: phy: improve get_phy_id
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 16 Jan 2019 18:52:51 +0000 (19:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jan 2019 21:59:00 +0000 (13:59 -0800)
commitd8cce3a1bc539f7e928eb1d094a312089b146aa4
treecb0ecab071408278f52a4d827782dd8e38b8e603
parente302c2a5fe0ca63b8fcc93389917625f486e0670
net: phy: improve get_phy_id

Only caller of get_phy_id() is get_phy_device(). There a PHY ID of
0xffffffff is translated back to -ENODEV. So we can avoid some
overhead by returning -ENODEV directly.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c