staging: rtl8192e: rtllib_crypt_tkip: rewritten comparison to NULL
authorAaron Lawrence <t4rmin@zohomail.com>
Wed, 26 Oct 2022 12:43:51 +0000 (19:43 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2022 08:07:20 +0000 (09:07 +0100)
Rewritten a comparison to NULL with a negation operator in
accordance with the Linux kernel coding-style regulations. The fix
was directly recommended by the checkpatch script.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Link: https://lore.kernel.org/r/ca33296630627020694f4b653580f689a8a3d1c7.1666787061.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib_crypt_tkip.c

index b8a52b9..9fdfcc0 100644 (file)
@@ -62,7 +62,7 @@ static void *rtllib_tkip_init(int key_idx)
                return NULL;
 
        priv = kzalloc(sizeof(*priv), GFP_ATOMIC);
-       if (priv == NULL)
+       if (!priv)
                goto fail;
        priv->key_idx = key_idx;