projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
misc: bcm-vk: Replace zero-length array with flexible array member
[linux-2.6-microblaze.git]
/
drivers
/
misc
/
bcm-vk
/
bcm_vk_msg.c
diff --git
a/drivers/misc/bcm-vk/bcm_vk_msg.c
b/drivers/misc/bcm-vk/bcm_vk_msg.c
index
f40cf08
..
6efc52b
100644
(file)
--- a/
drivers/misc/bcm-vk/bcm_vk_msg.c
+++ b/
drivers/misc/bcm-vk/bcm_vk_msg.c
@@
-701,8
+701,7
@@
int bcm_vk_send_shutdown_msg(struct bcm_vk *vk, u32 shut_type,
return -EINVAL;
}
- entry = kzalloc(sizeof(*entry) +
- sizeof(struct vk_msg_blk), GFP_KERNEL);
+ entry = kzalloc(struct_size(entry, to_v_msg, 1), GFP_KERNEL);
if (!entry)
return -ENOMEM;