Skip to content
/ linux Public

Commit ca372a9

Browse files
Tzung-Bi ShihSasha Levin
authored andcommitted
platform/chrome: cros_ec_lightbar: Fix response size initialization
[ Upstream commit ec0dd36 ] Commit 1e7913f ("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: 1e7913f ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2900b1d commit ca372a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/chrome/cros_ec_lightbar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static int get_lightbar_version(struct cros_ec_dev *ec,
117117
param = (struct ec_params_lightbar *)msg->data;
118118
param->cmd = LIGHTBAR_CMD_VERSION;
119119
msg->outsize = sizeof(param->cmd);
120-
msg->result = sizeof(resp->version);
120+
msg->insize = sizeof(resp->version);
121121
ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
122122
if (ret < 0 && ret != -EINVAL) {
123123
ret = 0;

0 commit comments

Comments
 (0)