mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
greybus: uart: handle NULL size requests in request_operation()
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
parent
1e776f3183
commit
ed7538e5a3
1 changed files with 2 additions and 1 deletions
|
|
@ -177,7 +177,8 @@ static int request_operation(struct gb_connection *connection, int type,
|
|||
ret = -EIO;
|
||||
} else {
|
||||
/* Good request, so copy to the caller's buffer */
|
||||
memcpy(response, local_response, response_size);
|
||||
if (response_size && response)
|
||||
memcpy(response, local_response, response_size);
|
||||
}
|
||||
out:
|
||||
gb_operation_destroy(operation);
|
||||
|
|
|
|||
Loading…
Reference in a new issue