projects
/
GitHub
/
moto-9609
/
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:
f2102d3
)
Staging: batman-adv: return -EFAULT on copy_to_user errors
author
Dan Carpenter
<error27@gmail.com>
Sun, 6 Jun 2010 19:03:04 +0000
(21:03 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 30 Jun 2010 15:18:14 +0000
(08:18 -0700)
copy_to_user() returns the number of bites remaining but we want to
return a negative error code here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/batman-adv/device.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/batman-adv/device.c
b/drivers/staging/batman-adv/device.c
index 7eb6559e03158d07eada6eccddf882ddaa2ec537..32204b5572d0c8e78a34b89c69a04c6d11cb762c 100644
(file)
--- a/
drivers/staging/batman-adv/device.c
+++ b/
drivers/staging/batman-adv/device.c
@@
-196,7
+196,7
@@
ssize_t bat_device_read(struct file *file, char __user *buf, size_t count,
kfree(device_packet);
if (error)
- return
error
;
+ return
-EFAULT
;
return sizeof(struct icmp_packet);
}