diff options
author | Dinghao Liu <dinghao.liu@zju.edu.cn> | 2020-05-20 20:46:47 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-05-29 20:31:59 +0300 |
commit | 282a04bf1d8029eb98585cb5db3fd70fe8bc91f7 (patch) | |
tree | da68b7914a4780fe78d97cffde19a3dbe0c1bb50 /drivers/net/wireless | |
parent | 9604617e998b49f7695fea1479ed82421ef8c9f0 (diff) | |
download | linux-282a04bf1d8029eb98585cb5db3fd70fe8bc91f7.tar.bz2 |
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: 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
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 4421fc656b1c..fa4ced9864c0 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -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) { |