Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/chrome: cros_ec_lightbar: Fix response size initialization

Commit 1e7913ff5f9f ("platform/chrome: cros_ec_lightbar: Reduce
ligthbar get version command") meant to set smaller values for both
request and response sizes.

However, it incorrectly assigned the response size to the `result` field
instead of `insize`. Fix it.

Reported-by: Gwendal Grignou <gwendal@google.com>
Closes: https://lore.kernel.org/chrome-platform/CAMHSBOVrrYaB=1nEqZk09VkczCrj=6B-P8Fe29TpPdSDgT2CCQ@mail.gmail.com
Fixes: 1e7913ff5f9f ("platform/chrome: cros_ec_lightbar: Reduce ligthbar get version command")
Link: https://lore.kernel.org/r/20260130040335.361997-1-tzungbi@kernel.org
Reviewed-by: Gwendal Grignou <gwendal@google.com>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>

+1 -1
+1 -1
drivers/platform/chrome/cros_ec_lightbar.c
··· 126 126 param = (struct ec_params_lightbar *)msg->data; 127 127 param->cmd = LIGHTBAR_CMD_VERSION; 128 128 msg->outsize = sizeof(param->cmd); 129 - msg->result = sizeof(resp->version); 129 + msg->insize = sizeof(resp->version); 130 130 ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); 131 131 if (ret < 0 && ret != -EINVAL) { 132 132 ret = 0;