rtio: Transactions assume valid next list nodes
Add an assert ensuring programming errors where the executor code
assumes there is a next node in the list for transaction/chained
submissions.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
diff --git a/subsys/rtio/rtio_executor.c b/subsys/rtio/rtio_executor.c
index 49347b3..e4ad8fe 100644
--- a/subsys/rtio/rtio_executor.c
+++ b/subsys/rtio/rtio_executor.c
@@ -84,6 +84,10 @@
"Expected chained or transaction flag, not both");
#endif
node = mpsc_pop(&iodev_sqe->r->sq);
+
+ __ASSERT(node != NULL,
+ "Expected a valid submission in the queue while in a transaction or chain");
+
next = CONTAINER_OF(node, struct rtio_iodev_sqe, q);
/* If the current submission was cancelled before submit,