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
This commit is contained in:
@@ -2696,13 +2696,17 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
|
|||||||
|
|
||||||
if (!wlcore_is_p2p_mgmt(wlvif)) {
|
if (!wlcore_is_p2p_mgmt(wlvif)) {
|
||||||
ret = wl12xx_cmd_role_disable(wl, &wlvif->role_id);
|
ret = wl12xx_cmd_role_disable(wl, &wlvif->role_id);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
pm_runtime_put_noidle(wl->dev);
|
||||||
goto deinit;
|
goto deinit;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id);
|
ret = wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
pm_runtime_put_noidle(wl->dev);
|
||||||
goto deinit;
|
goto deinit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pm_runtime_mark_last_busy(wl->dev);
|
pm_runtime_mark_last_busy(wl->dev);
|
||||||
pm_runtime_put_autosuspend(wl->dev);
|
pm_runtime_put_autosuspend(wl->dev);
|
||||||
|
|||||||
Reference in New Issue
Block a user