sensor: fix assertion

With rtio_sqe_prep_read() buf is assigned to userdata. The __ASSERT
should check if the same userdata arrived with rtio_cqe_consume_block()$

Signed-off-by: Mirko Becker <mirko.becker@phoenixcontact.com>
This commit is contained in:
Mirko Becker 2024-10-09 09:29:20 +02:00 committed by Anas Nashif
parent b9df2bed64
commit 4d4938fa2e
1 changed files with 1 additions and 1 deletions

View File

@ -1064,7 +1064,7 @@ static inline int sensor_read(struct rtio_iodev *iodev, struct rtio *ctx, uint8_
struct rtio_cqe *cqe = rtio_cqe_consume_block(ctx); struct rtio_cqe *cqe = rtio_cqe_consume_block(ctx);
int res = cqe->result; int res = cqe->result;
__ASSERT(cqe->userdata != buf, __ASSERT(cqe->userdata == buf,
"consumed non-matching completion for sensor read into buffer %p\n", buf); "consumed non-matching completion for sensor read into buffer %p\n", buf);
rtio_cqe_release(ctx, cqe); rtio_cqe_release(ctx, cqe);