Signed-off-by: Daniel Walker<dwalker@xxxxxxxxxx>
---
drivers/staging/android/binder.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 17d89a8..c37336d 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -2146,7 +2146,7 @@ static int binder_thread_read(struct binder_proc *proc,
void __user *end = buffer + size;
int ret = 0;
- int wait_for_proc_work;
+ int wait_for_proc_work = 0;
if (*consumed == 0) {
if (put_user(BR_NOOP, (uint32_t __user *)ptr))
@@ -2155,8 +2155,8 @@ static int binder_thread_read(struct binder_proc *proc,
}
retry:
- wait_for_proc_work = thread->transaction_stack == NULL&&
- list_empty(&thread->todo);
+ if (list_empty(&thread->todo)&& thread->transaction_stack == NULL)
+ wait_for_proc_work = 1;