]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: wlcore: fix unbalanced pm_runtime calls
authorAndreas Kemnade <andreas@kemnade.info>
Sat, 4 Jan 2025 19:55:07 +0000 (20:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:49:57 +0000 (12:49 +0100)
commit9394c1163c209aa730c69c430e66d5e301feee68
tree5fd7a815280baa9852a53b73e1155184ae5bca2d
parenta7e98a85990af7292d472875ee917cf491fdd7d7
wifi: wlcore: fix unbalanced pm_runtime calls

[ Upstream commit 996c934c8c196144af386c4385f61fcd5349af28 ]

If firmware boot failes, runtime pm is put too often:
[12092.708099] wlcore: ERROR firmware boot failed despite 3 retries
[12092.708099] wl18xx_driver wl18xx.1.auto: Runtime PM usage count underflow!
Fix that by redirecting all error gotos before runtime_get so that runtime is
not put.

Fixes: c40aad28a3cf ("wlcore: Make sure firmware is initialized in wl1271_op_add_interface()")
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Reviewed-by: Michael Nemanov <michael.nemanov@ti.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20250104195507.402673-1-akemnade@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ti/wlcore/main.c