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.
Unified · Split
| @@ -126,7 +126,7 @@ static int get_lightbar_version(struct cros_ec_dev *ec, · 125 unmodified lines | |||
| 126 | param = (struct ec_params_lightbar *)msg->data; | 126 | param = (struct ec_params_lightbar *)msg->data; |
| 127 | param->cmd = LIGHTBAR_CMD_VERSION; | 127 | param->cmd = LIGHTBAR_CMD_VERSION; |
| 128 | msg->outsize = sizeof(param->cmd); | 128 | msg->outsize = sizeof(param->cmd); |
| 129 | msg->result = sizeof(resp->version); | 129 | msg->insize = sizeof(resp->version); |
| 130 | ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); | 130 | ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg); |
| 131 | if (ret < 0 && ret != -EINVAL) { | 131 | if (ret < 0 && ret != -EINVAL) { |
| 132 | ret = 0; | 132 | ret = 0; |