OSDN Git Service

wilc1000: call complete() for failure in wilc_wlan_txq_add_cfg_pkt()
authorAjay Singh <ajay.kathat@microchip.com>
Wed, 25 Nov 2020 11:41:10 +0000 (11:41 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 2 Dec 2020 19:38:11 +0000 (21:38 +0200)
Added complete() call for failure case in wilc_wlan_txq_add_cfg_pkt().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201125114059.10006-5-ajay.kathat@microchip.com
drivers/net/wireless/microchip/wilc1000/wlan.c

index 42b5db4..0ff4de2 100644 (file)
@@ -258,8 +258,10 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc_vif *vif, u8 *buffer,
        }
 
        tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC);
-       if (!tqe)
+       if (!tqe) {
+               complete(&wilc->cfg_event);
                return 0;
+       }
 
        tqe->type = WILC_CFG_PKT;
        tqe->buffer = buffer;