projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e776f3
)
greybus: uart: handle NULL size requests in request_operation()
author
Greg Kroah-Hartman
<greg@kroah.com>
Mon, 17 Nov 2014 23:15:34 +0000
(15:15 -0800)
committer
Greg Kroah-Hartman
<greg@kroah.com>
Mon, 17 Nov 2014 23:16:02 +0000
(15:16 -0800)
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/uart-gb.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/greybus/uart-gb.c
b/drivers/staging/greybus/uart-gb.c
index 533c3c20d09591ef0bc5bf6e70da491315f13e95..a4f745afa8853d8b4a1d4d49aa1949181d94fa34 100644
(file)
--- a/
drivers/staging/greybus/uart-gb.c
+++ b/
drivers/staging/greybus/uart-gb.c
@@
-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);