From 938bc5581d3bd5c22e1b86c73b48cee648abb2cb Mon Sep 17 00:00:00 2001 From: Yongrong Wang Date: Wed, 31 Jul 2024 15:36:43 +0800 Subject: [PATCH] rpmsg: fix rpmsg_virtio_get_tx_payload_buffer error If rpmsg_virtio_notify_wait returns RPMSG_SUCCESS, we don't call rpmsg_virtio_get_tx_buffer. Signed-off-by: Yongrong Wang Signed-off-by: Bowen Wang --- lib/rpmsg/rpmsg_virtio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rpmsg/rpmsg_virtio.c b/lib/rpmsg/rpmsg_virtio.c index 7baaedd5..010559e6 100644 --- a/lib/rpmsg/rpmsg_virtio.c +++ b/lib/rpmsg/rpmsg_virtio.c @@ -393,9 +393,8 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev, if (status == RPMSG_EOPNOTSUPP) { metal_sleep_usec(RPMSG_TICKS_PER_INTERVAL); tick_count--; - } else if (status == RPMSG_SUCCESS) { + } else if (status != RPMSG_SUCCESS) break; - } } if (!rp_hdr)