]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: wfx: Fix error handling in wfx_core_init()
authorYuan Can <yuancan@huawei.com>
Tue, 22 Oct 2024 09:04:53 +0000 (17:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:50:56 +0000 (19:50 +0100)
commit46b8e788c49df45bf18f4f4a560792a42001884a
tree1e5d444339c0f6d7e108400afb6b812b04cc1f3a
parent940389e96d99db20f0eda4e9254ced88244c3399
wifi: wfx: Fix error handling in wfx_core_init()

[ Upstream commit 3b88a9876779b55478a4dde867e73f7a100ffa23 ]

The wfx_core_init() returns without checking the retval from
sdio_register_driver().
If the sdio_register_driver() failed, the module failed to install,
leaving the wfx_spi_driver not unregistered.

Fixes: a7a91ca5a23d ("staging: wfx: add infrastructure for new driver")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241022090453.84679-1-yuancan@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/wfx/main.c