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
@@ -433,9 +433,6 @@ int generic_mii_ioctl(struct mii_if_info *mii_if,
|
||||
case SIOCSMIIREG: {
|
||||
u16 val = mii_data->val_in;
|
||||
|
||||
if (!capable(CAP_NET_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (mii_data->phy_id == mii_if->phy_id) {
|
||||
switch(mii_data->reg_num) {
|
||||
case MII_BMCR: {
|
||||
|
||||
Reference in New Issue
Block a user