]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
binder: use EPOLLERR from eventpoll.h
authorCarlos Llamas <cmllamas@google.com>
Fri, 1 Dec 2023 17:21:30 +0000 (17:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 22:52:31 +0000 (14:52 -0800)
commit 6ac061db9c58ca5b9270b1b3940d2464fb3ff183 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: f88982679f54 ("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>
drivers/android/binder.c

index b63322e7e1011d48e3d334caaa7fdea2f353a745..b4b73093757f82ab3e4687eecf279ce94607d537 100644 (file)
@@ -4836,7 +4836,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;