projects
/
linux.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
|
history
diff --git
a/drivers/staging/greybus/uart-gb.c
b/drivers/staging/greybus/uart-gb.c
index
533c3c2
..
a4f745a
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);