vrend: Don't try to copy to res->iov if there is none
I found the commit(https://source.chromium.org/chromiumos/_/chromium/chromiumos/third_party/virglrenderer/+/cbc561637750f61b2d80348a40e03da46c0ea6dd) only fixed the bug in the function vrend_renderer_transfer_write_iov
. So fix the same issue in the function vrend_renderer_transfer_send_iov
.
The patch is:
@@ -9485,8 +9485,8 @@ static int vrend_renderer_transfer_send_iov(struct vrend_context *ctx,
const struct iovec *iov, int num_iovs,
const struct vrend_transfer_info *info)
{
- if (is_only_bit(res->storage_bits, VREND_STORAGE_GUEST_MEMORY) ||
- (has_bit(res->storage_bits, VREND_STORAGE_HOST_SYSTEM_MEMORY) && res->iov)) {
+ if ((is_only_bit(res->storage_bits, VREND_STORAGE_GUEST_MEMORY) ||
+ has_bit(res->storage_bits, VREND_STORAGE_HOST_SYSTEM_MEMORY)) && res->iov) {
return vrend_copy_iovec(res->iov, res->num_iovs, info->box->x,
iov, num_iovs, info->offset,
info->box->width, res->ptr);