1
0
Fork 0

wlcore: fix runtime pm imbalance in wlcore_regdomain_config

[ Upstream commit 282a04bf1d ]

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: 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/20200520124649.10848-1-dinghao.liu@zju.edu.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Dinghao Liu 2020-05-20 20:46:47 +08:00 committed by Greg Kroah-Hartman
parent a0f8499fba
commit ec705f9ffb
1 changed files with 3 additions and 1 deletions

View File

@ -3658,8 +3658,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) {