Skip to content

Commit

Permalink
openamp: add assert when get tx buffer failed
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Yongrong Wang <[email protected]>
  • Loading branch information
Donny9 authored and wyr-7 committed Sep 19, 2024
1 parent a142dae commit 0436d97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rpmsg/rpmsg_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev,
}
}

metal_assert(!wait || rp_hdr);

if (!rp_hdr)
return NULL;

Expand Down

0 comments on commit 0436d97

Please sign in to comment.