Skip to content

Commit

Permalink
rpmsg_virtio.c: fix get_tx_payload_buffer error
Browse files Browse the repository at this point in the history
if rpmsg_virtio_notify_wait return RPMSG_SUCCESS, we don't call
rpmsg_virtio_get_tx_buffer

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
  • Loading branch information
wyr-7 committed Oct 9, 2024
1 parent c468328 commit 7db6b5b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/rpmsg/rpmsg_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,9 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev,
* use metal_sleep_usec() method by default.
*/
status = rpmsg_virtio_notify_wait(rvdev, rvdev->rvq);
if (status == RPMSG_EOPNOTSUPP) {
if (status != RPMSG_SUCCESS) {
metal_sleep_usec(RPMSG_TICKS_PER_INTERVAL);
tick_count--;
} else if (status == RPMSG_SUCCESS) {
break;
}
}

Expand Down

0 comments on commit 7db6b5b

Please sign in to comment.