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/tlan.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/tlan.c')
-rw-r--r-- | drivers/net/tlan.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index 49e273bceed6..3d31b47332bb 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -1004,8 +1004,6 @@ static int TLan_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
1004 | 1004 | ||
1005 | 1005 | ||
1006 | case SIOCSMIIREG: /* Write MII PHY register. */ | 1006 | case SIOCSMIIREG: /* Write MII PHY register. */ |
1007 | if (!capable(CAP_NET_ADMIN)) | ||
1008 | return -EPERM; | ||
1009 | TLan_MiiWriteReg(dev, data->phy_id & 0x1f, | 1007 | TLan_MiiWriteReg(dev, data->phy_id & 0x1f, |
1010 | data->reg_num & 0x1f, data->val_in); | 1008 | data->reg_num & 0x1f, data->val_in); |
1011 | return 0; | 1009 | return 0; |