From: Chaehyun Lim Date: Thu, 21 Jan 2016 11:30:55 +0000 (+0900) Subject: staging: wilc1000: fix coding style of kmalloc usage X-Git-Tag: v4.6~331^2~1363 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7adf4f312bb7e1f3bda90ed048d78a5a55099f10;p=platform%2Fkernel%2Flinux-amlogic.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 7107715..c7a60f4 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;