Message ID | 20191107235821.12767-1-michael@walle.cc |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | enetc: fix return value for enetc_ioctl() | expand |
From: Michael Walle <michael@walle.cc> Date: Fri, 8 Nov 2019 00:58:21 +0100 > Return -EOPNOTSUPP instead of -EINVAL if the requested ioctl is not > implemented. > > Signed-off-by: Michael Walle <michael@walle.cc> Always specificy explcitly the target tree for your change, in the Subject line, which in this case should have been: [PATCH net-next] enetc: ...
On Fri, Nov 08, 2019 at 12:58:21AM +0100, Michael Walle wrote: > Return -EOPNOTSUPP instead of -EINVAL if the requested ioctl is not > implemented. > > Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
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); }
Return -EOPNOTSUPP instead of -EINVAL if the requested ioctl is not implemented. Signed-off-by: Michael Walle <michael@walle.cc> --- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)