summaryrefslogtreecommitdiff
path: root/drivers/android
diff options
context:
space:
mode:
authorZhang Qilong <zhangqilong3@huawei.com>2020-10-26 14:03:14 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-09 20:42:21 +0300
commit88f6c77927e4aee04e0193fd94e13a55753a72b0 (patch)
treedc68a3e5cd77fede5ab7be3e9f6b7df50198cb3e /drivers/android
parent6c20032c22d9823f35cd673b7f69ce73a49582b0 (diff)
downloadlinux-88f6c77927e4aee04e0193fd94e13a55753a72b0.tar.xz
binder: change error code from postive to negative in binder_transaction
Depending on the context, the error return value here (extra_buffers_size < added_size) should be negative. Acked-by: Martijn Coenen <maco@android.com> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Link: https://lore.kernel.org/r/20201026110314.135481-1-zhangqilong3@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android')
-rw-r--r--drivers/android/binder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 3241d233a12d..cf70cb91e9f6 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -3103,7 +3103,7 @@ static void binder_transaction(struct binder_proc *proc,
if (extra_buffers_size < added_size) {
/* integer overflow of extra_buffers_size */
return_error = BR_FAILED_REPLY;
- return_error_param = EINVAL;
+ return_error_param = -EINVAL;
return_error_line = __LINE__;
goto err_bad_extra_size;
}