diff options
author | Jiefeng Li <jiefeng_li@hust.edu.cn> | 2023-04-12 08:22:34 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-04-17 17:46:06 +0200 |
commit | 5c47cdebbaeb7724df6f9f46917c93e53f791547 (patch) | |
tree | 5f1b02a3ee3401c44b3249e2b44f27307f762e1c /drivers/net/wireless/mediatek/mt76 | |
parent | mt76: mt7921: fix kernel panic by accessing unallocated eeprom.data (diff) | |
download | linux-5c47cdebbaeb7724df6f9f46917c93e53f791547.tar.xz linux-5c47cdebbaeb7724df6f9f46917c93e53f791547.zip |
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: 0d2afe09fad5 ("mt76: mt7921: add mt7921u driver")
Signed-off-by: Jiefeng Li <jiefeng_li@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c index 9b05e4577cdf..1f302c430339 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c @@ -259,7 +259,7 @@ static int mt7921u_probe(struct usb_interface *usb_intf, ret = mt7921u_dma_init(dev, false); if (ret) - return ret; + goto error; hw = mt76_hw(dev); /* check hw sg support in order to enable AMSDU */ |