Skip to content

Commit 61a3d85

Browse files
Donny9wyr-7
authored andcommitted
openamp: add assert when get tx buffer failed
add assert for judge it can't get buffer after wait RPMSG_TICK_COUNT time, and in this case, it can be jugded as logic problem directly Signed-off-by: Jiuzhu1 Dong <dongjiuzhu1@xiaomi.com> Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
1 parent 603345c commit 61a3d85

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/rpmsg/rpmsg_virtio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev,
390390
}
391391
}
392392

393+
metal_assert(!wait || rp_hdr);
394+
393395
if (!rp_hdr)
394396
return NULL;
395397

0 commit comments

Comments
 (0)