Skip to content

Commit

Permalink
Fix ignored return value in virt/kvm/ioregion.c
Browse files Browse the repository at this point in the history
In virt/kvm/ioregion.c the return values are ignored on two occasions.
This causes compiler warnings that let the kernel build fail. Both are
now fixed by just putting the value into some variable that was around.
  • Loading branch information
gierens committed Jul 6, 2022
1 parent f08eae8 commit 42f0fd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virt/kvm/ioregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ ioregion_read(struct kvm_vcpu *vcpu, struct kvm_io_device *this, gpa_t addr,
return -EOPNOTSUPP;
}

mutex_lock_interruptible(&p->ctx->mutex);
ret = mutex_lock_interruptible(&p->ctx->mutex);

ret = kernel_write(p->wf, cmd, sizeof(*cmd), 0);
if (ret != sizeof(*cmd)) {
Expand Down Expand Up @@ -217,7 +217,7 @@ ioregion_write(struct kvm_vcpu *vcpu, struct kvm_io_device *this, gpa_t addr,
return -EOPNOTSUPP;
}

mutex_lock_interruptible(&p->ctx->mutex);
ret = mutex_lock_interruptible(&p->ctx->mutex);

ret = kernel_write(p->wf, cmd, sizeof(*cmd), 0);
if (ret != sizeof(*cmd)) {
Expand Down

0 comments on commit 42f0fd4

Please sign in to comment.