staging: wilc1000: wilc_msgqueue.c: remove kfree NULL check
authorChaehyun Lim <chaehyun.lim@gmail.com>
Wed, 19 Aug 2015 06:59:02 +0000 (15:59 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:29 +0000 (18:24 -0700)
This patch removes kfree NULL check.
WARNING: kfree(NULL) is safe and this check is probably not required.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_msgqueue.c

index 0770ff6..d97dd70 100644 (file)
@@ -96,9 +96,7 @@ WILC_ErrNo WILC_MsgQueueSend(WILC_MsgQueueHandle *pHandle,
        {
                /* error occured, free any allocations */
                if (pstrMessage) {
-                       if (pstrMessage->pvBuffer)
-                               kfree(pstrMessage->pvBuffer);
-
+                       kfree(pstrMessage->pvBuffer);
                        kfree(pstrMessage);
                }
        }