]> git.baikalelectronics.ru Git - kernel.git/commitdiff
wlcore: fix runtime pm imbalance in __wl1271_op_remove_interface
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Wed, 20 May 2020 13:08:04 +0000 (21:08 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 29 May 2020 17:34:47 +0000 (20:34 +0300)
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
drivers/net/wireless/ti/wlcore/main.c

index bf6698fc1389403aabb4703c9270369be2a73c7f..0dcad4949889c26edebd2ee561036d107f869dd9 100644 (file)
@@ -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);