You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
David S. Miller
parent
aae5e7c30f
commit
7ab0f2736b
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user