]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: rtl8723bs: use !ptr instead of ptr == NULL
authorMichael Huang <tehsiu.huang@gmail.com>
Sat, 24 Jan 2026 23:15:57 +0000 (15:15 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jan 2026 14:46:34 +0000 (15:46 +0100)
Simplify pointer null checks by using the "!ptr" convention instead of
the more verbose "ptr == NULL" comparison.

Signed-off-by: Michael Huang <tehsiu.huang@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/20260124231557.18189-8-tehsiu.huang@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c

index 4ba4f85be02d3be901266d94568e65cd822037f2..884fcce50d9caaf972364f609ef557922ddacf5f 100644 (file)
@@ -5994,8 +5994,7 @@ u8 run_in_thread_hdl(struct adapter *padapter, u8 *pbuf)
 {
        struct RunInThread_param *p;
 
-
-       if (pbuf == NULL)
+       if (!pbuf)
                return H2C_PARAMETERS_ERROR;
        p = (struct RunInThread_param *)pbuf;