net: dsa: return -ENODEV is there is no slave PHY
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Tue, 26 Sep 2017 21:15:31 +0000 (17:15 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Sep 2017 03:06:34 +0000 (20:06 -0700)
commitf4344e0a48121d07cf8f69415278e84c39dbe9bf
treef6d92d396a44787aca9f245ac82181c2c819b503
parentf6fc5b494d7b10d61ef82c416d4e963cba56f1a5
net: dsa: return -ENODEV is there is no slave PHY

Instead of returning -EOPNOTSUPP when a slave device has no PHY,
directly return -ENODEV as ethtool and phylib do.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c