netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] enetc: fix return value for enetc_ioctl()
@ 2019-11-07 23:58 Michael Walle
  2019-11-08  3:41 ` David Miller
  2019-11-08 13:27 ` Andrew Lunn
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Walle @ 2019-11-07 23:58 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: David S . Miller, Claudiu Manoil, Andrew Lunn, Michael Walle

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(-)

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] enetc: fix return value for enetc_ioctl()
  2019-11-07 23:58 [PATCH] enetc: fix return value for enetc_ioctl() Michael Walle
@ 2019-11-08  3:41 ` David Miller
  2019-11-08 13:27 ` Andrew Lunn
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-11-08  3:41 UTC (permalink / raw)
  To: michael; +Cc: netdev, linux-kernel, claudiu.manoil, andrew

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: ...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] enetc: fix return value for enetc_ioctl()
  2019-11-07 23:58 [PATCH] enetc: fix return value for enetc_ioctl() Michael Walle
  2019-11-08  3:41 ` David Miller
@ 2019-11-08 13:27 ` Andrew Lunn
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2019-11-08 13:27 UTC (permalink / raw)
  To: Michael Walle; +Cc: netdev, linux-kernel, David S . Miller, Claudiu Manoil

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-08 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07 23:58 [PATCH] enetc: fix return value for enetc_ioctl() Michael Walle
2019-11-08  3:41 ` David Miller
2019-11-08 13:27 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).