We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a2ff005 + 01f1269 commit e0464adCopy full SHA for e0464ad
1 file changed
drivers/hid/hid-google-hammer.c
@@ -58,7 +58,7 @@ static int cbas_ec_query_base(struct cros_ec_device *ec_dev, bool get_state,
58
struct cros_ec_command *msg;
59
int ret;
60
61
- msg = kzalloc(sizeof(*msg) + max(sizeof(u32), sizeof(*params)),
+ msg = kzalloc(struct_size(msg, data, max(sizeof(u32), sizeof(*params))),
62
GFP_KERNEL);
63
if (!msg)
64
return -ENOMEM;
0 commit comments