From e4cb837e4a063723558f590fabe870e42a274d91 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rpmsg/rpmsg_virtio.c b/lib/rpmsg/rpmsg_virtio.c index eff2438f..00d12464 100644 --- a/lib/rpmsg/rpmsg_virtio.c +++ b/lib/rpmsg/rpmsg_virtio.c @@ -394,7 +394,7 @@ 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; } }