mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 15:47:36 +00:00
greybus: loopback: fix invalid response size
The size of timestamps is not taken into account, which makes the loopback driver in the firmware drop invalid packages. Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
5c864e775d
commit
9864756be7
1 changed files with 2 additions and 2 deletions
|
@ -534,8 +534,8 @@ static int gb_loopback_request_recv(u8 type, struct gb_operation *operation)
|
|||
}
|
||||
|
||||
if (len) {
|
||||
if (!gb_operation_response_alloc(operation, len,
|
||||
GFP_KERNEL)) {
|
||||
if (!gb_operation_response_alloc(operation,
|
||||
len + sizeof(*response), GFP_KERNEL)) {
|
||||
dev_err(dev, "error allocating response\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue