wifi: rtw89: Add missing check for alloc_workqueue
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Wed, 4 Jan 2023 14:29:01 +0000 (22:29 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 16 Jan 2023 13:36:15 +0000 (15:36 +0200)
commited9e6166eb0984b718facb7ca59296098cc3aa64
tree7b85372d5ff683fa6403b3a767c4323907b67863
parent4a0e218cc9c42d1903ade8b5a371dcf48cf918c5
wifi: rtw89: Add missing check for alloc_workqueue

Add check for the return value of alloc_workqueue since it may return
NULL pointer.
Moreover, add destroy_workqueue when rtw89_load_firmware fails.

Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230104142901.1611-1-jiasheng@iscas.ac.cn
drivers/net/wireless/realtek/rtw89/core.c