From: Dinghao Liu Date: Wed, 20 May 2020 13:08:04 +0000 (+0800) Subject: wlcore: fix runtime pm imbalance in __wl1271_op_remove_interface X-Git-Tag: baikal/mips/sdk5.9~13530^2~46^2~17 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=33cd0db97b99ec2c875456c42af2db362a84b805;p=kernel.git 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 Acked-by: Tony Lindgren Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200520130806.14789-1-dinghao.liu@zju.edu.cn --- diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index bf6698fc13894..0dcad4949889c 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);