]> git.baikalelectronics.ru Git - kernel.git/commitdiff
wlcore: fix runtime pm imbalance in wl1271_tx_work
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Wed, 20 May 2020 12:42:38 +0000 (20:42 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 29 May 2020 17:31:03 +0000 (20:31 +0300)
There are two error handling paths in this functon. When
wlcore_tx_work_locked() returns an error code, we should
decrease the runtime PM usage counter the same way as the
error handling path beginning from pm_runtime_get_sync().

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200520124241.9931-1-dinghao.liu@zju.edu.cn
drivers/net/wireless/ti/wlcore/tx.c

index 90e56d4c3df3bfa37ff811b3149c6a10ea11bd76..e20e18cd04aeda796678e0ac0f72727e87afcaee 100644 (file)
@@ -863,6 +863,7 @@ void wl1271_tx_work(struct work_struct *work)
 
        ret = wlcore_tx_work_locked(wl);
        if (ret < 0) {
+               pm_runtime_put_noidle(wl->dev);
                wl12xx_queue_recovery_work(wl);
                goto out;
        }