Skip to content

Commit bb4459f

Browse files
CV-Bowenarnopo
authored andcommitted
rpmsg_virtio: fix rpmsg_virtio_get_tx_payload_buffer() error
If rpmsg_virtio_notify_wait() returns RPMSG_SUCCESS, we should not directly return NULL, but call rpmsg_virtio_get_tx_buffer to get the tx buffer again. Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com> Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
1 parent 47be1f3 commit bb4459f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/rpmsg/rpmsg_virtio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev,
394394
if (status == RPMSG_EOPNOTSUPP) {
395395
metal_sleep_usec(RPMSG_TICKS_PER_INTERVAL);
396396
tick_count--;
397-
} else if (status == RPMSG_SUCCESS) {
397+
} else if (status != RPMSG_SUCCESS) {
398398
break;
399399
}
400400
}

0 commit comments

Comments
 (0)