diff mbox series

wlcore: fix runtime pm imbalance in wl1271_tx_work

Message ID 20200520124241.9931-1-dinghao.liu@zju.edu.cn
State Awaiting Upstream
Delegated to: David Miller
Headers show
Series wlcore: fix runtime pm imbalance in wl1271_tx_work | expand

Commit Message

Dinghao Liu May 20, 2020, 12:42 p.m. UTC
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>
---
 drivers/net/wireless/ti/wlcore/tx.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tony Lindgren May 20, 2020, 6:52 p.m. UTC | #1
* Dinghao Liu <dinghao.liu@zju.edu.cn> [691231 23:00]:
> 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().

Acked-by: Tony Lindgren <tony@atomide.com>
Kalle Valo May 29, 2020, 5:31 p.m. UTC | #2
Dinghao Liu <dinghao.liu@zju.edu.cn> wrote:

> 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>

Patch applied to wireless-drivers-next.git, thanks.

9604617e998b wlcore: fix runtime pm imbalance in wl1271_tx_work
diff mbox series

Patch

diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index 90e56d4c3df3..e20e18cd04ae 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;
 	}