summaryrefslogtreecommitdiffstats
path: root/drivers/net/pci-skeleton.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-09-03 10:39:43 +0000
committerDavid S. Miller <davem@davemloft.net>2009-09-03 20:02:11 -0700
commit7ab0f2736bfe137a82a7084bbfb5f809da95cabd (patch)
treee305ec96eceebb285efee4b6fd307822ab257fe6 /drivers/net/pci-skeleton.c
parentaae5e7c30fc660c50dfecbdd745799b05af90f01 (diff)
downloadlinux-7ab0f2736bfe137a82a7084bbfb5f809da95cabd.tar.gz
linux-7ab0f2736bfe137a82a7084bbfb5f809da95cabd.tar.bz2
linux-7ab0f2736bfe137a82a7084bbfb5f809da95cabd.zip
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/pci-skeleton.c')
-rw-r--r--drivers/net/pci-skeleton.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c
index c47ba3610c58..0c44b48f1384 100644
--- a/drivers/net/pci-skeleton.c
+++ b/drivers/net/pci-skeleton.c
@@ -1784,11 +1784,6 @@ static int netdrv_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
break;
case SIOCSMIIREG: /* Write MII PHY register. */
- if (!capable (CAP_NET_ADMIN)) {
- rc = -EPERM;
- break;
- }
-
spin_lock_irqsave (&tp->lock, flags);
mdio_write (dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in);
spin_unlock_irqrestore (&tp->lock, flags);