Message ID | 20220826105634.3855578-12-o.rempel@pengutronix.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 5bd3ecd121e34370b4d5a02de925335655bbaa9a |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: microchip: add error handling and register access validation | expand |
diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c index fb9de6b447b12..f0c81d90c99f4 100644 --- a/drivers/net/dsa/microchip/ksz9477.c +++ b/drivers/net/dsa/microchip/ksz9477.c @@ -341,10 +341,6 @@ int ksz9477_w_phy(struct ksz_device *dev, u16 addr, u16 reg, u16 val) if (addr >= dev->phy_port_cnt) return 0; - /* No gigabit support. Do not write to this register. */ - if (!dev->info->gbit_capable[addr] && reg == MII_CTRL1000) - return -ENXIO; - return ksz_pwrite16(dev, addr, 0x100 + (reg << 1), val); }