Skip to content

Commit

Permalink
openamp: rpmsg_send() shouldn't check buffer size when get buffer failed
Browse files Browse the repository at this point in the history
cause _rpmsg_virtio_get_buffer_size() always return size > 0,
when role is RPMSG_MASTER.

Signed-off-by: Guiding Li <liguiding1@xiaomi.com>
  • Loading branch information
GUIDINGLI authored and xiaoxiang781216 committed Dec 14, 2021
1 parent 166055b commit 411f624
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rpmsg/rpmsg_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev,
metal_mutex_release(&rdev->lock);
if (rp_hdr || !tick_count)
break;

metal_sleep_usec(RPMSG_TICKS_PER_INTERVAL);
tick_count--;
}
Expand Down

0 comments on commit 411f624

Please sign in to comment.