Staging: rtl8723bs: Replace NULL comparison with !
authorMadhumitha Prabakaran <madhumithabiw@gmail.com>
Mon, 18 Mar 2019 23:12:35 +0000 (18:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Mar 2019 13:32:35 +0000 (14:32 +0100)
Replace NULL comparison with ! in function rtw_init_cmd_priv, to
maintain Linux kernel coding style.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_cmd.c

index 32d8ff9e41bd9cbc52259a5f39f8724289efc0e1..9edd0dda3c06eb48c28e698c38ce0554c09a5f2f 100644 (file)
@@ -177,7 +177,7 @@ int rtw_init_cmd_priv(struct        cmd_priv *pcmdpriv)
 
        pcmdpriv->cmd_allocated_buf = rtw_zmalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ);
 
-       if (pcmdpriv->cmd_allocated_buf == NULL) {
+       if (!pcmdpriv->cmd_allocated_buf) {
                res = -ENOMEM;
                goto exit;
        }
@@ -186,7 +186,7 @@ int rtw_init_cmd_priv(struct        cmd_priv *pcmdpriv)
 
        pcmdpriv->rsp_allocated_buf = rtw_zmalloc(MAX_RSPSZ + 4);
 
-       if (pcmdpriv->rsp_allocated_buf == NULL) {
+       if (!pcmdpriv->rsp_allocated_buf) {
                res = -ENOMEM;
                goto exit;
        }