OSDN Git Service

mt76: mt7921: fix retrying release semaphore without end
authorSean Wang <sean.wang@mediatek.com>
Tue, 14 Sep 2021 15:50:22 +0000 (23:50 +0800)
committerFelix Fietkau <nbd@nbd.name>
Wed, 20 Oct 2021 08:36:43 +0000 (10:36 +0200)
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>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c

index f49fc80..56fb7e5 100644 (file)
@@ -736,7 +736,7 @@ out:
        default:
                ret = -EAGAIN;
                dev_err(dev->mt76.dev, "Failed to release patch semaphore\n");
-               goto out;
+               break;
        }
        release_firmware(fw);