From 7adf4f312bb7e1f3bda90ed048d78a5a55099f10 Mon Sep 17 00:00:00 2001 From: Chaehyun Lim Date: Thu, 21 Jan 2016 20:30:55 +0900 Subject: [PATCH] staging: wilc1000: fix coding style of kmalloc usage This patch fixes coding style of kmalloc usage found by checkpatch. CHECK: Prefer kmalloc(sizeof(*new_msg)...) over kmalloc(sizeof(struct message)...) Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/wilc_msgqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index 71077157033c..c7a60f44db77 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c +++ b/drivers/staging/wilc1000/wilc_msgqueue.c @@ -70,7 +70,7 @@ int wilc_mq_send(struct message_queue *mq, } /* construct a new message */ - new_msg = kmalloc(sizeof(struct message), GFP_ATOMIC); + new_msg = kmalloc(sizeof(*new_msg), GFP_ATOMIC); if (!new_msg) return -ENOMEM; -- 2.34.1