diff options
author | Peter Wu <lekensteyn@gmail.com> | 2013-08-17 01:07:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-20 14:57:42 -0700 |
commit | e7fb06a1b4d1c5bdcbbf78f7c7e938835395bcdb (patch) | |
tree | 869b81ffd62cafc21eaf5f75b049dc9a8c10bca5 /drivers/net/ethernet/realtek/r8169.c | |
parent | d765bb41fde311b57de32bdc9d17965debe8b7af (diff) | |
download | op-kernel-dev-e7fb06a1b4d1c5bdcbbf78f7c7e938835395bcdb.zip op-kernel-dev-e7fb06a1b4d1c5bdcbbf78f7c7e938835395bcdb.tar.gz |
r8169,sis190: remove unnecessary length check
The ethtool core will lower the requested length to the one returned by
get_regs_len, therefore no additional check is needed in the get_regs
function.
Reported-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Peter Wu <lekensteyn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek/r8169.c')
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index b5eb419..93ee49d 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -1898,9 +1898,6 @@ static void rtl8169_get_regs(struct net_device *dev, struct ethtool_regs *regs, { struct rtl8169_private *tp = netdev_priv(dev); - if (regs->len > R8169_REGS_SIZE) - regs->len = R8169_REGS_SIZE; - rtl_lock_work(tp); memcpy_fromio(p, tp->mmio_addr, regs->len); rtl_unlock_work(tp); |