]> git.baikalelectronics.ru Git - kernel.git/commit
rtw88: Fix potential probe error handling race with wow firmware loading
authorAndreas Färber <afaerber@suse.de>
Sun, 20 Sep 2020 13:26:21 +0000 (15:26 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 24 Sep 2020 15:49:56 +0000 (18:49 +0300)
commitf7a139f3aed502f924a86731384d3d8aa1f2acf7
tree97a062d66cbc245306514ca57f9b6d8767f22f6d
parentb302b4a22904235a6201c6eb76f149de4e3e6ee5
rtw88: Fix potential probe error handling race with wow firmware loading

If rtw_core_init() fails to load the wow firmware, rtw_core_deinit()
will not get called to clean up the regular firmware.

Ensure that an error loading the wow firmware does not produce an oops
for the regular firmware by waiting on its completion to be signalled
before returning. Also release the loaded firmware.

Fixes: e4647cb95139 ("rtw88: load wowlan firmware if wowlan is supported")
Cc: Chin-Yen Lee <timlee@realtek.com>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200920132621.26468-3-afaerber@suse.de
drivers/net/wireless/realtek/rtw88/main.c