diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-09-03 06:39:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-03 23:02:11 -0400 |
commit | 7ab0f2736bfe137a82a7084bbfb5f809da95cabd (patch) | |
tree | e305ec96eceebb285efee4b6fd307822ab257fe6 /drivers/net/r8169.c | |
parent | aae5e7c30fc660c50dfecbdd745799b05af90f01 (diff) |
netdev: Remove redundant checks for CAP_NET_ADMIN in MDIO implementations
dev_ioctl() already checks capable(CAP_NET_ADMIN) before calling the
driver's implementation of MDIO ioctls.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r-- | drivers/net/r8169.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index ec0092affd5..a91e9b3a3eb 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -1991,8 +1991,6 @@ static int rtl_xmii_ioctl(struct rtl8169_private *tp, struct mii_ioctl_data *dat | |||
1991 | return 0; | 1991 | return 0; |
1992 | 1992 | ||
1993 | case SIOCSMIIREG: | 1993 | case SIOCSMIIREG: |
1994 | if (!capable(CAP_NET_ADMIN)) | ||
1995 | return -EPERM; | ||
1996 | mdio_write(tp->mmio_addr, data->reg_num & 0x1f, data->val_in); | 1994 | mdio_write(tp->mmio_addr, data->reg_num & 0x1f, data->val_in); |
1997 | return 0; | 1995 | return 0; |
1998 | } | 1996 | } |