diff mbox series

[2/2] mt76: mt7921: fix retrying release semaphore without end

Message ID b3b18e00b76699342af5f8a841221022a66a2f4c.1631633959.git.objelf@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] mt76: mt7921: robustify hardware initialization flow | expand

Commit Message

Sean Wang Sept. 14, 2021, 3:50 p.m. UTC
From: Sean Wang <sean.wang@mediatek.com>

We should pass the error code to the caller immediately
to avoid the possible infinite retry to release the semaphore.

Fixes: 1c099ab44727 ("mt76: mt7921: add MCU support")
Co-developed-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
index 9b35b5da3619..db33506567dc 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
@@ -876,7 +876,7 @@  static int mt7921_load_patch(struct mt7921_dev *dev)
 	default:
 		ret = -EAGAIN;
 		dev_err(dev->mt76.dev, "Failed to release patch semaphore\n");
-		goto out;
+		break;
 	}
 	release_firmware(fw);