From: Chaehyun Lim Date: Thu, 21 Jan 2016 11:30:55 +0000 (+0900) Subject: staging: wilc1000: fix coding style of kmalloc usage X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7adf4f312bb7e1f3bda90ed048d78a5a55099f10;p=linux-beck.git 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 --- 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;