summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/smsc75xx.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-02-21 06:42:26 +0100
committerDavid S. Miller <davem@davemloft.net>2018-02-22 20:05:15 +0100
commit88e80c62671ceecdbb77c902731ec95a4bfa62f9 (patch)
tree53e1b8baebc2764ab51353b9ade417272d044f6e /drivers/net/usb/smsc75xx.c
parentnetlink: put module reference if dump start fails (diff)
downloadlinux-88e80c62671ceecdbb77c902731ec95a4bfa62f9.tar.xz
linux-88e80c62671ceecdbb77c902731ec95a4bfa62f9.zip
smsc75xx: fix smsc75xx_set_features()
If an attempt is made to disable RX checksums, USB adapter is changed but netdev->features is not, because smsc75xx_set_features() returns a non zero value. This throws errors from netdev_rx_csum_fault() : <devname>: hw csum failure Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/usb/smsc75xx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index d0a113743195..7a6a1fe79309 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -954,10 +954,11 @@ static int smsc75xx_set_features(struct net_device *netdev,
/* it's racing here! */
ret = smsc75xx_write_reg(dev, RFE_CTL, pdata->rfe_ctl);
- if (ret < 0)
+ if (ret < 0) {
netdev_warn(dev->net, "Error writing RFE_CTL\n");
-
- return ret;
+ return ret;
+ }
+ return 0;
}
static int smsc75xx_wait_ready(struct usbnet *dev, int in_pm)