mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 15:49:42 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5b8e7ba9fd
commit
7adf4f312b
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user