From: Dinghao Liu Date: Wed, 20 May 2020 12:42:38 +0000 (+0800) Subject: wlcore: fix runtime pm imbalance in wl1271_tx_work X-Git-Tag: baikal/mips/sdk5.9~13530^2~46^2~20 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=2b40fe8b0d83400bc426ac47a1ea7e34e2f7e3b8;p=kernel.git wlcore: fix runtime pm imbalance in wl1271_tx_work 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 Acked-by: Tony Lindgren Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200520124241.9931-1-dinghao.liu@zju.edu.cn --- diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index 90e56d4c3df3b..e20e18cd04aed 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c @@ -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; }