Skip to content
/ linux Public

Commit 31dcb63

Browse files
Liang JieSasha Levin
authored andcommitted
staging: rtl8723bs: fix missing status update on sdio_alloc_irq() failure
[ Upstream commit 618b4ae ] The return value of sdio_alloc_irq() was not stored in status. If sdio_alloc_irq() fails after rtw_drv_register_netdev() succeeds, status remains _SUCCESS and the error path skips resource cleanup, while rtw_drv_init() still returns success. Store the return value of sdio_alloc_irq() in status and reuse the existing error handling which relies on status. Reviewed-by: fanggeng <fanggeng@lixiang.com> Signed-off-by: Liang Jie <liangjie@lixiang.com> Link: https://patch.msgid.link/20251208092730.262499-1-buaajxlj@163.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 487e455 commit 31dcb63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/staging/rtl8723bs/os_dep/sdio_intf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ static int rtw_drv_init(
377377
if (status != _SUCCESS)
378378
goto free_if1;
379379

380-
if (sdio_alloc_irq(dvobj) != _SUCCESS)
380+
status = sdio_alloc_irq(dvobj);
381+
if (status != _SUCCESS)
381382
goto free_if1;
382383

383384
status = _SUCCESS;

0 commit comments

Comments
 (0)