提交 3fe60c45 编写于 作者: P Petko Manolov 提交者: Zheng Zengkai

net: usb: pegasus: fixes of set_register(s) return value evaluation;

mainline inclusion
from mainline-5.10.62
commit 384dea502e9119d90a1f700ddf2d5a861f8bde34
bugzilla: 182217 https://gitee.com/openeuler/kernel/issues/I4EFOS

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=384dea502e9119d90a1f700ddf2d5a861f8bde34

--------------------------------

[ Upstream commit ffc9c3eb ]

- 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: 8a160e2e ("net: usb: pegasus: Check the return value of get_geristers() and friends;")
Reported-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NPetko Manolov <petko.manolov@konsulko.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 0a01bba5
...@@ -471,7 +471,7 @@ static int enable_net_traffic(struct net_device *dev, struct usb_device *usb) ...@@ -471,7 +471,7 @@ static int enable_net_traffic(struct net_device *dev, struct usb_device *usb)
write_mii_word(pegasus, 0, 0x1b, &auxmode); write_mii_word(pegasus, 0, 0x1b, &auxmode);
} }
return 0; return ret;
fail: fail:
netif_dbg(pegasus, drv, pegasus->net, "%s failed\n", __func__); netif_dbg(pegasus, drv, pegasus->net, "%s failed\n", __func__);
return ret; return ret;
...@@ -861,7 +861,7 @@ static int pegasus_open(struct net_device *net) ...@@ -861,7 +861,7 @@ static int pegasus_open(struct net_device *net)
if (!pegasus->rx_skb) if (!pegasus->rx_skb)
goto exit; 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_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
usb_rcvbulkpipe(pegasus->usb, 1), usb_rcvbulkpipe(pegasus->usb, 1),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册