forked from pool/openamp
* Added virtio feature negotiation. * update IRQ registration in apps * bug fixes - added patches fix https://github.com/OpenAMP/open-amp/pull/196 + openamp-fix-build-with-libmetal.patch fix https://github.com/OpenAMP/open-amp/pull/197 + openamp-wait-when-no-more-buffer-avail.patch OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/openamp?expand=0&rev=2
15 lines
553 B
Diff
15 lines
553 B
Diff
diff --git a/lib/rpmsg/rpmsg_virtio.c b/lib/rpmsg/rpmsg_virtio.c
|
|
index cf3ec213..1e360163 100644
|
|
--- a/lib/rpmsg/rpmsg_virtio.c
|
|
+++ b/lib/rpmsg/rpmsg_virtio.c
|
|
@@ -308,7 +308,7 @@ static int rpmsg_virtio_send_offchannel_raw(struct rpmsg_device *rdev,
|
|
/* Lock the device to enable exclusive access to virtqueues */
|
|
metal_mutex_acquire(&rdev->lock);
|
|
avail_size = _rpmsg_virtio_get_buffer_size(rvdev);
|
|
- if (size > avail_size) {
|
|
+ if (avail_size && size > avail_size) {
|
|
metal_mutex_release(&rdev->lock);
|
|
return RPMSG_ERR_BUFF_SIZE;
|
|
}
|
|
|