projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'driver-core-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git]
/
drivers
/
staging
/
android
/
ion
/
ion.c
diff --git
a/drivers/staging/android/ion/ion.c
b/drivers/staging/android/ion/ion.c
index
396ded5
..
209a8f7
100644
(file)
--- a/
drivers/staging/android/ion/ion.c
+++ b/
drivers/staging/android/ion/ion.c
@@
-1187,8
+1187,10
@@
int ion_query_heaps(struct ion_client *client, struct ion_heap_query *query)
hdata.type = heap->type;
hdata.heap_id = heap->id;
- ret = copy_to_user(&buffer[cnt],
- &hdata, sizeof(hdata));
+ if (copy_to_user(&buffer[cnt], &hdata, sizeof(hdata))) {
+ ret = -EFAULT;
+ goto out;
+ }
cnt++;
if (cnt >= max_cnt)