summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetko Manolov <petko.manolov@konsulko.com>2021-08-20 08:57:53 +0200
committerDavid S. Miller <davem@davemloft.net>2021-08-20 15:57:05 +0200
commitffc9c3ebb4af870a121da99826e9ccb63dc8b3d7 (patch)
treea68547de86f511153ee4c0908b3e4f50a5300e43
parentnet: qrtr: fix another OOB Read in qrtr_endpoint_post (diff)
downloadlinux-ffc9c3ebb4af870a121da99826e9ccb63dc8b3d7.tar.xz
linux-ffc9c3ebb4af870a121da99826e9ccb63dc8b3d7.zip
net: usb: pegasus: fixes of set_register(s) return value evaluation;
- restore the behavior in enable_net_traffic() to avoid regressions - Jakub Kicinski; - hurried up and removed redundant assignment in pegasus_open() before yet another checker complains; Fixes: 8a160e2e9aeb ("net: usb: pegasus: Check the return value of get_geristers() and friends;") Reported-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Petko Manolov <petko.manolov@konsulko.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/usb/pegasus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index 652e9fcf0b77..9f9dd0de33cb 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -446,7 +446,7 @@ static int enable_net_traffic(struct net_device *dev, struct usb_device *usb)
write_mii_word(pegasus, 0, 0x1b, &auxmode);
}
- return 0;
+ return ret;
fail:
netif_dbg(pegasus, drv, pegasus->net, "%s failed\n", __func__);
return ret;
@@ -835,7 +835,7 @@ static int pegasus_open(struct net_device *net)
if (!pegasus->rx_skb)
goto exit;
- res = set_registers(pegasus, EthID, 6, net->dev_addr);
+ set_registers(pegasus, EthID, 6, net->dev_addr);
usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
usb_rcvbulkpipe(pegasus->usb, 1),