Skip to content

Commit

Permalink
binder: use EPOLLERR from eventpoll.h
Browse files Browse the repository at this point in the history
commit 6ac061d upstream.

Use EPOLLERR instead of POLLERR to make sure it is cast to the correct
__poll_t type. This fixes the following sparse issue:

  drivers/android/binder.c:5030:24: warning: incorrect type in return expression (different base types)
  drivers/android/binder.c:5030:24:    expected restricted __poll_t
  drivers/android/binder.c:5030:24:    got int

Fixes: f889826 ("binder: check for binder_thread allocation failure in binder_poll()")
Cc: stable@vger.kernel.org
Cc: Eric Biggers <ebiggers@google.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20231201172212.1813387-2-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Carlos Llamas authored and gregkh committed Jan 20, 2024
1 parent 0de40f7 commit 4a6eefb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/android/binder.c
Expand Up @@ -5030,7 +5030,7 @@ static __poll_t binder_poll(struct file *filp,

thread = binder_get_thread(proc);
if (!thread)
return POLLERR;
return EPOLLERR;

binder_inner_proc_lock(thread->proc);
thread->looper |= BINDER_LOOPER_STATE_POLL;
Expand Down

0 comments on commit 4a6eefb

Please sign in to comment.