staging: wilc1000: wilc_msgqueue.c: use kmalloc with GFP_ATOMIC
authorChaehyun Lim <chaehyun.lim@gmail.com>
Mon, 7 Sep 2015 15:36:38 +0000 (00:36 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:45 +0000 (18:24 -0700)
This patch use kmalloc with GFP_ATOMIC instead of WILC_MALLOC.
It is inside the spin lock region.

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 76d2e63dc2d5d0ff8fac164829a20b0276165af4..41244ce942ba26021b223cc66c77d1a09bd3fa5e 100644 (file)
@@ -72,7 +72,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
        WILC_NULLCHECK(s32RetStatus, pstrMessage);
        pstrMessage->u32Length = u32SendBufferSize;
        pstrMessage->pstrNext = NULL;
-       pstrMessage->pvBuffer = WILC_MALLOC(u32SendBufferSize);
+       pstrMessage->pvBuffer = kmalloc(u32SendBufferSize, GFP_ATOMIC);
        WILC_NULLCHECK(s32RetStatus, pstrMessage->pvBuffer);
        memcpy(pstrMessage->pvBuffer, pvSendBuffer, u32SendBufferSize);