Commit e0464ad2 authored by Jiri Kosina's avatar Jiri Kosina

Merge branch 'for-5.18/google' into for-linus

parents a2ff0059 01f1269f
......@@ -58,7 +58,7 @@ static int cbas_ec_query_base(struct cros_ec_device *ec_dev, bool get_state,
struct cros_ec_command *msg;
int ret;
msg = kzalloc(sizeof(*msg) + max(sizeof(u32), sizeof(*params)),
msg = kzalloc(struct_size(msg, data, max(sizeof(u32), sizeof(*params))),
GFP_KERNEL);
if (!msg)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment