]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
enetc: fix return value for enetc_ioctl()
authorMichael Walle <michael@walle.cc>
Thu, 7 Nov 2019 23:58:21 +0000 (00:58 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Nov 2019 03:41:17 +0000 (19:41 -0800)
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>
drivers/net/ethernet/freescale/enetc/enetc.c

index 25af207f1962fd2ba7d452237fd3c0e8d571e917..3e8f9819f08c82f0d25cd3983eed03a4bbf48948 100644 (file)
@@ -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);
 }