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 0770ff6d5d7f4054f20ec8753ca729e232911911..d97dd705da5a3e0d4973f1c86773126cbb0ed5a9 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);
                }
        }