Commit 5c47cdeb authored by Jiefeng Li's avatar Jiefeng Li Committed by Felix Fietkau

wifi: mt76: mt7921: fix missing unwind goto in `mt7921u_probe`

`mt7921u_dma_init` can only return zero or negative number according to its
definition. When it returns non-zero number, there exists an error and this
function should handle this error rather than return directly.

Fixes: 0d2afe09 ("mt76: mt7921: add mt7921u driver")
Signed-off-by: default avatarJiefeng Li <jiefeng_li@hust.edu.cn>
Reviewed-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
Reviewed-by: default avatarSridhar Samudrala <sridhar.samudrala@intel.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 12db28c3
...@@ -259,7 +259,7 @@ static int mt7921u_probe(struct usb_interface *usb_intf, ...@@ -259,7 +259,7 @@ static int mt7921u_probe(struct usb_interface *usb_intf,
ret = mt7921u_dma_init(dev, false); ret = mt7921u_dma_init(dev, false);
if (ret) if (ret)
return ret; goto error;
hw = mt76_hw(dev); hw = mt76_hw(dev);
/* check hw sg support in order to enable AMSDU */ /* check hw sg support in order to enable AMSDU */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment