board/sg-led.c: Remove error path from update cmd

No way to return it to the host application anyway since this
command is unacknowledged.
This commit is contained in:
Tau
2019-02-25 21:55:49 -05:00
parent 8606d17699
commit 2cbb18604b
3 changed files with 4 additions and 11 deletions

View File

@ -160,24 +160,18 @@ static HRESULT sg_led_cmd_set_color(
const struct sg_led *led,
const struct sg_led_req_set_color *req)
{
HRESULT hr;
if (req->req.payload_len != sizeof(req->payload)) {
sg_led_dprintf(led, "%s: Payload size is incorrect\n", __func__);
goto fail;
}
hr = led->ops->set_color(
led->ops->set_color(
led->ops_ctx,
req->payload[0],
req->payload[1],
req->payload[2]);
if (FAILED(hr)) {
sg_led_dprintf(led, "led->ops->set_color: Error %x\n", hr);
}
fail:
/* No response */
return S_FALSE;

View File

@ -8,7 +8,7 @@
struct sg_led_ops {
HRESULT (*reset)(void *ctx);
HRESULT (*set_color)(void *ctx, uint8_t r, uint8_t g, uint8_t b);
void (*set_color)(void *ctx, uint8_t r, uint8_t g, uint8_t b);
};
struct sg_led {