summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2019-11-08 00:58:21 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-07 19:41:17 -0800
commitc55b810abb136191b6c9f40301eb5efcf8503f38 (patch)
tree8f86fe1f42252f48a7ecf43296e999294cd7c524 /drivers/net
parent200ecef67b8d09d16ec55f91c92751dcc7a38d40 (diff)
downloadlinux-c55b810abb136191b6c9f40301eb5efcf8503f38.tar.bz2
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/freescale/enetc/enetc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
index 25af207f1962..3e8f9819f08c 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -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);
}