From c55b810abb136191b6c9f40301eb5efcf8503f38 Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Fri, 8 Nov 2019 00:58:21 +0100 Subject: [PATCH] enetc: fix return value for enetc_ioctl() Return -EOPNOTSUPP instead of -EINVAL if the requested ioctl is not implemented. Signed-off-by: Michael Walle Signed-off-by: David S. Miller --- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }