Commit 282a04bf authored by Dinghao Liu's avatar Dinghao Liu Committed by Kalle Valo

wlcore: fix runtime pm imbalance in wlcore_regdomain_config

pm_runtime_get_sync() increments the runtime PM usage counter even
the call returns an error code. Thus a pairing decrement is needed
on the error handling path to keep the counter balanced.
Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200520124649.10848-1-dinghao.liu@zju.edu.cn
parent 9604617e
......@@ -3665,8 +3665,10 @@ void wlcore_regdomain_config(struct wl1271 *wl)
goto out;
ret = pm_runtime_get_sync(wl->dev);
if (ret < 0)
if (ret < 0) {
pm_runtime_put_autosuspend(wl->dev);
goto out;
}
ret = wlcore_cmd_regdomain_config_locked(wl);
if (ret < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment