From 5287ce8ff003f9ad7428864a9e53a42424b3d135 Mon Sep 17 00:00:00 2001 From: NingX Zhao Date: Thu, 25 Nov 2021 14:33:39 +0800 Subject: [PATCH] poll: modify the function z_vrfy_k_poll Removing the 'U' to avoid the type of num_events changed. And make sure it is meaningful Z_SYSCALL_VERIFY micro. Fixed #40614 Signed-off-by: NingX Zhao --- kernel/poll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/poll.c b/kernel/poll.c index b4e3897b9b1..9c29af7f42c 100644 --- a/kernel/poll.c +++ b/kernel/poll.c @@ -348,7 +348,7 @@ static inline int z_vrfy_k_poll(struct k_poll_event *events, /* Validate the events buffer and make a copy of it in an * allocated kernel-side buffer. */ - if (Z_SYSCALL_VERIFY(num_events >= 0U)) { + if (Z_SYSCALL_VERIFY(num_events >= 0)) { ret = -EINVAL; goto out; }