Skip to content

Commit 938bc55

Browse files
committed
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 <[email protected]> Signed-off-by: Bowen Wang <[email protected]>
1 parent c468328 commit 938bc55

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/rpmsg/rpmsg_virtio.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,8 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev,
393393
if (status == RPMSG_EOPNOTSUPP) {
394394
metal_sleep_usec(RPMSG_TICKS_PER_INTERVAL);
395395
tick_count--;
396-
} else if (status == RPMSG_SUCCESS) {
396+
} else if (status != RPMSG_SUCCESS)
397397
break;
398-
}
399398
}
400399

401400
if (!rp_hdr)

0 commit comments

Comments
 (0)