rtio: Fix syscall verify misra-c:2004 12.4 issue

MISRA-C says the right hand of a logical and should not contain side
effect operations. Instead nest the branches to get the same logic
without the MISRA-C rule breakage.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
This commit is contained in:
Tom Burdick 2025-07-10 16:56:06 -05:00 committed by Chris Friedt
parent 95c3b8e085
commit be4c3804de

View File

@ -19,8 +19,10 @@
*/
static inline bool rtio_vrfy_sqe(struct rtio_sqe *sqe)
{
if (sqe->iodev != NULL && K_SYSCALL_OBJ(sqe->iodev, K_OBJ_RTIO_IODEV)) {
return false;
if (sqe->iodev != NULL) {
if (K_SYSCALL_OBJ(sqe->iodev, K_OBJ_RTIO_IODEV)) {
return false;
}
}
bool valid_sqe = true;