[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230412062234.4810-1-jiefeng_li@hust.edu.cn>
Date: Wed, 12 Apr 2023 14:22:34 +0800
From: Jiefeng Li <jiefeng_li@...t.edu.cn>
To: Felix Fietkau <nbd@....name>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Ryder Lee <ryder.lee@...iatek.com>,
Shayne Chen <shayne.chen@...iatek.com>,
Sean Wang <sean.wang@...iatek.com>,
Kalle Valo <kvalo@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
Cc: Jiefeng Li <jiefeng_li@...t.edu.cn>,
Dongliang Mu <dzm91@...t.edu.cn>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: [PATCH] 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@...t.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@...t.edu.cn>
---
The issue is discovered by static analysis, and the patch is not tested yet.
---
drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
index 8fef09ed29c9..70c9bbdbf60e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
@@ -272,7 +272,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 */
--
2.34.1
Powered by blists - more mailing lists