]> git.baikalelectronics.ru Git - kernel.git/commitdiff
wlcore: fix runtime pm imbalance in wl1271_op_suspend
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Wed, 20 May 2020 12:57:22 +0000 (20:57 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 29 May 2020 17:34:17 +0000 (20:34 +0300)
When wlcore_hw_interrupt_notify() 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/20200520125724.12832-1-dinghao.liu@zju.edu.cn
drivers/net/wireless/ti/wlcore/main.c

index fa4ced9864c0e246a0e76a29aeeb2f9e16939412..bf6698fc1389403aabb4703c9270369be2a73c7f 100644 (file)
@@ -1746,9 +1746,7 @@ static int __maybe_unused wl1271_op_suspend(struct ieee80211_hw *hw,
 
                ret = wl1271_configure_suspend(wl, wlvif, wow);
                if (ret < 0) {
-                       mutex_unlock(&wl->mutex);
-                       wl1271_warning("couldn't prepare device to suspend");
-                       return ret;
+                       goto out_sleep;
                }
        }