enetc: fix return value for enetc_ioctl()

Return -EOPNOTSUPP instead of -EINVAL if the requested ioctl is not
implemented.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Michael Walle 2019-11-08 00:58:21 +01:00 committed by David S. Miller
parent 200ecef67b
commit c55b810abb
1 changed files with 1 additions and 1 deletions

View File

@ -1601,7 +1601,7 @@ int enetc_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
#endif
if (!ndev->phydev)
return -EINVAL;
return -EOPNOTSUPP;
return phy_mii_ioctl(ndev->phydev, rq, cmd);
}