aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/vhost/vhost.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 34ea219936e3..acabf20b069e 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -2180,7 +2180,7 @@ static int get_indirect(struct vhost_virtqueue *vq,
2180 /* If this is an input descriptor, increment that count. */ 2180 /* If this is an input descriptor, increment that count. */
2181 if (access == VHOST_ACCESS_WO) { 2181 if (access == VHOST_ACCESS_WO) {
2182 *in_num += ret; 2182 *in_num += ret;
2183 if (unlikely(log)) { 2183 if (unlikely(log && ret)) {
2184 log[*log_num].addr = vhost64_to_cpu(vq, desc.addr); 2184 log[*log_num].addr = vhost64_to_cpu(vq, desc.addr);
2185 log[*log_num].len = vhost32_to_cpu(vq, desc.len); 2185 log[*log_num].len = vhost32_to_cpu(vq, desc.len);
2186 ++*log_num; 2186 ++*log_num;
@@ -2321,7 +2321,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq,
2321 /* If this is an input descriptor, 2321 /* If this is an input descriptor,
2322 * increment that count. */ 2322 * increment that count. */
2323 *in_num += ret; 2323 *in_num += ret;
2324 if (unlikely(log)) { 2324 if (unlikely(log && ret)) {
2325 log[*log_num].addr = vhost64_to_cpu(vq, desc.addr); 2325 log[*log_num].addr = vhost64_to_cpu(vq, desc.addr);
2326 log[*log_num].len = vhost32_to_cpu(vq, desc.len); 2326 log[*log_num].len = vhost32_to_cpu(vq, desc.len);
2327 ++*log_num; 2327 ++*log_num;