aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atl1c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-09-03 06:39:43 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-03 23:02:11 -0400
commit7ab0f2736bfe137a82a7084bbfb5f809da95cabd (patch)
treee305ec96eceebb285efee4b6fd307822ab257fe6 /drivers/net/atl1c
parentaae5e7c30fc660c50dfecbdd745799b05af90f01 (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/atl1c')
-rw-r--r--drivers/net/atl1c/atl1c_main.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c
index e46bf9238692..be2c6cfe6e84 100644
--- a/drivers/net/atl1c/atl1c_main.c
+++ b/drivers/net/atl1c/atl1c_main.c
@@ -534,10 +534,6 @@ static int atl1c_mii_ioctl(struct net_device *netdev,
534 break; 534 break;
535 535
536 case SIOCGMIIREG: 536 case SIOCGMIIREG:
537 if (!capable(CAP_NET_ADMIN)) {
538 retval = -EPERM;
539 goto out;
540 }
541 if (atl1c_read_phy_reg(&adapter->hw, data->reg_num & 0x1F, 537 if (atl1c_read_phy_reg(&adapter->hw, data->reg_num & 0x1F,
542 &data->val_out)) { 538 &data->val_out)) {
543 retval = -EIO; 539 retval = -EIO;
@@ -546,10 +542,6 @@ static int atl1c_mii_ioctl(struct net_device *netdev,
546 break; 542 break;
547 543
548 case SIOCSMIIREG: 544 case SIOCSMIIREG:
549 if (!capable(CAP_NET_ADMIN)) {
550 retval = -EPERM;
551 goto out;
552 }
553 if (data->reg_num & ~(0x1F)) { 545 if (data->reg_num & ~(0x1F)) {
554 retval = -EFAULT; 546 retval = -EFAULT;
555 goto out; 547 goto out;