Skip to content

Commit

Permalink
enetc: fix return value for enetc_ioctl()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Walle authored and David S. Miller committed Nov 8, 2019
1 parent 200ecef commit c55b810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/freescale/enetc/enetc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit c55b810

Please sign in to comment.