Commit 782c3b73 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: gpio: Print expected/actual payload size on mismatch

Print (expected-payload-size actual-payload-size), when the size doesn't
match for requests received by the module. This gives more details
required for debugging the issue.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 7fea641c
......@@ -366,7 +366,8 @@ static int gb_gpio_request_recv(u8 type, struct gb_operation *op)
request = op->request;
if (request->payload_size < sizeof(*event)) {
dev_err(ggc->chip.dev, "short event received\n");
dev_err(ggc->chip.dev, "short event received (%zu < %zu)\n",
request->payload_size, sizeof(*event));
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment