summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChaehyun Lim <chaehyun.lim@gmail.com>2016-01-21 20:30:55 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-03 15:21:18 -0800
commit7adf4f312bb7e1f3bda90ed048d78a5a55099f10 (patch)
tree0b40ea1b4545a9c9ed6add03418cd2699856d9fd
parent5b8e7ba9fdb01323867d8df6b6758527f9b87b81 (diff)
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 <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/wilc1000/wilc_msgqueue.c2
1 files changed, 1 insertions, 1 deletions
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;