Skip to content

Commit

Permalink
rpmsg_virtio: fix rpmsg_virtio_get_tx_payload_buffer() error
Browse files Browse the repository at this point in the history
If rpmsg_virtio_notify_wait() returns RPMSG_SUCCESS, we should not
directly return NULL instead 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>
  • Loading branch information
CV-Bowen committed Oct 18, 2024
1 parent a69881f commit 2f6eb4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rpmsg/rpmsg_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 2f6eb4f

Please sign in to comment.