]> git.ipfire.org Git - thirdparty/linux.git/commit
staging: rtl8723bs: remove thread wraper functions and add IS_ERR() check
authorSamasth Norway Ananda <samasth.norway.ananda@oracle.com>
Fri, 30 Jan 2026 00:16:41 +0000 (16:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Feb 2026 12:35:58 +0000 (13:35 +0100)
commitc41ac3530710e9d49e0ddd5e6f338407f6d4ab00
tree0ed31b5ddb16ad135f6c46c5727c391a18bbe5b2
parent4dba9d6c691327f06276619ae97bab8aa48b2dbe
staging: rtl8723bs: remove thread wraper functions and add IS_ERR() check

The rtl8723b_start_thread() and rtl8723b_stop_thread() functions are
wrappers that are only called from one place each. Remove these wrapper
functions and inline the thread handling directly in
rtw_start_drv_threads() and rtw_stop_drv_threads().

This also fixes a bug where kthread_run() was not checked for errors
using IS_ERR(). kthread_run() returns ERR_PTR(-ENOMEM) on failure, not
NULL. Without this check, the SdioXmitThread pointer could contain an
error value, causing issues when rtw_stop_drv_threads() later attempts
to use it.

The inlined code now follows the same pattern as xmitThread and
cmdThread in rtw_start_drv_threads(), with proper IS_ERR() checking.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Link: https://patch.msgid.link/20260130001641.17941-4-samasth.norway.ananda@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/hal_intf.c
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
drivers/staging/rtl8723bs/include/hal_intf.h
drivers/staging/rtl8723bs/include/rtl8723b_hal.h
drivers/staging/rtl8723bs/os_dep/os_intfs.c