summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2022-03-23 10:03:54 +0100
committerJiri Kosina <jkosina@suse.cz>2022-03-23 10:03:54 +0100
commite0464ad24666f6e35236e3ac8263911efb9099e7 (patch)
tree11542e61c4adb1f893171888d45b5030e43949d0 /drivers/hid
parenta2ff0059270fd35770c6bb22dca86a491b832fb2 (diff)
parent01f1269fbb0ead7e37f85213f77fb8e7efc4e099 (diff)
Merge branch 'for-5.18/google' into for-linus
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-google-hammer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-google-hammer.c b/drivers/hid/hid-google-hammer.c
index 0403beb3104b..ddbe0de177e2 100644
--- a/drivers/hid/hid-google-hammer.c
+++ b/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,
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;