aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/assigned-dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'virt/kvm/assigned-dev.c')
-rw-r--r--virt/kvm/assigned-dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c
index bf06577fea51..5819a2708d7e 100644
--- a/virt/kvm/assigned-dev.c
+++ b/virt/kvm/assigned-dev.c
@@ -526,8 +526,10 @@ static int assign_guest_irq(struct kvm *kvm,
526 dev->irq_requested_type |= guest_irq_type; 526 dev->irq_requested_type |= guest_irq_type;
527 if (dev->ack_notifier.gsi != -1) 527 if (dev->ack_notifier.gsi != -1)
528 kvm_register_irq_ack_notifier(kvm, &dev->ack_notifier); 528 kvm_register_irq_ack_notifier(kvm, &dev->ack_notifier);
529 } else 529 } else {
530 kvm_free_irq_source_id(kvm, dev->irq_source_id); 530 kvm_free_irq_source_id(kvm, dev->irq_source_id);
531 dev->irq_source_id = -1;
532 }
531 533
532 return r; 534 return r;
533} 535}