Skip to content

Commit d9109fe

Browse files
andraprsgregkh
authored andcommitted
nitro_enclaves: Fixup type and simplify logic of the poll mask setup
Update the assigned value of the poll result to be EPOLLHUP instead of POLLHUP to match the __poll_t type. While at it, simplify the logic of setting the mask result of the poll function. Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Alexander Graf <graf@amazon.com> Signed-off-by: Andra Paraschiv <andraprs@amazon.com> Link: https://lore.kernel.org/r/20201102173622.32169-1-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3ed1cfb commit d9109fe

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/virt/nitro_enclaves/ne_misc_dev.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,10 +1505,8 @@ static __poll_t ne_enclave_poll(struct file *file, poll_table *wait)
15051505

15061506
poll_wait(file, &ne_enclave->eventq, wait);
15071507

1508-
if (!ne_enclave->has_event)
1509-
return mask;
1510-
1511-
mask = POLLHUP;
1508+
if (ne_enclave->has_event)
1509+
mask |= EPOLLHUP;
15121510

15131511
return mask;
15141512
}

0 commit comments

Comments
 (0)