From: Dinghao Liu Date: Wed, 20 May 2020 12:57:22 +0000 (+0800) Subject: wlcore: fix runtime pm imbalance in wl1271_op_suspend X-Git-Tag: baikal/mips/sdk5.9~13530^2~46^2~18 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=94f2c66cd0c5d666e7511e9337e84c9baf90e5d3;p=kernel.git wlcore: fix runtime pm imbalance in wl1271_op_suspend 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 Acked-by: Tony Lindgren Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200520125724.12832-1-dinghao.liu@zju.edu.cn --- diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index fa4ced9864c0e..bf6698fc13894 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -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; } }