summaryrefslogtreecommitdiffstats
path: root/drivers/virt/nitro_enclaves/ne_misc_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/virt/nitro_enclaves/ne_misc_dev.c')
-rw-r--r--drivers/virt/nitro_enclaves/ne_misc_dev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/virt/nitro_enclaves/ne_misc_dev.c b/drivers/virt/nitro_enclaves/ne_misc_dev.c
index f06622b48d69..f1964ea4b826 100644
--- a/drivers/virt/nitro_enclaves/ne_misc_dev.c
+++ b/drivers/virt/nitro_enclaves/ne_misc_dev.c
@@ -1505,10 +1505,8 @@ static __poll_t ne_enclave_poll(struct file *file, poll_table *wait)
poll_wait(file, &ne_enclave->eventq, wait);
- if (!ne_enclave->has_event)
- return mask;
-
- mask = POLLHUP;
+ if (ne_enclave->has_event)
+ mask |= EPOLLHUP;
return mask;
}