misc: bcm-vk: Replace zero-length array with flexible array member
[linux-2.6-microblaze.git] / drivers / misc / bcm-vk / bcm_vk_msg.c
index f40cf08..6efc52b 100644 (file)
@@ -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;