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 <[email protected]> Reviewed-by: Alexander Graf <[email protected]> Signed-off-by: Andra Paraschiv <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3ed1cfb commit d9109fe

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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)