summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDinghao Liu <dinghao.liu@zju.edu.cn>2020-05-20 21:08:04 +0800
committerKalle Valo <kvalo@codeaurora.org>2020-05-29 20:34:47 +0300
commit53df5271f2397706be85c3892246e3e726113902 (patch)
tree918a233f68634c9ffe39f2c1a44af0c0b8d912d0
parent3e69ed2b52fd0eeb1e812e20a667316d913e6a97 (diff)
wlcore: fix runtime pm imbalance in __wl1271_op_remove_interface
When wl12xx_cmd_role_disable() returns an error code, a pairing runtime PM usage counter decrement is needed to keep the counter balanced. 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/20200520130806.14789-1-dinghao.liu@zju.edu.cn
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index bf6698fc1389..0dcad4949889 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -2696,12 +2696,16 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
if (!wlcore_is_p2p_mgmt(wlvif)) {
ret = wl12xx_cmd_role_disable(wl, &wlvif->role_id);
- if (ret < 0)
+ if (ret < 0) {
+ pm_runtime_put_noidle(wl->dev);
goto deinit;
+ }
} else {
ret = wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id);
- if (ret < 0)
+ if (ret < 0) {
+ pm_runtime_put_noidle(wl->dev);
goto deinit;
+ }
}
pm_runtime_mark_last_busy(wl->dev);