diff mbox series

enetc: fix return value for enetc_ioctl()

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

Commit Message

Michael Walle Nov. 7, 2019, 11:58 p.m. UTC
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(-)

Comments

David Miller Nov. 8, 2019, 3:41 a.m. UTC | #1
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: ...
Andrew Lunn Nov. 8, 2019, 1:27 p.m. UTC | #2
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 mbox series

Patch

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);
 }