aboutsummaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-01-22 12:01:41 +0800
committerAlex Shi <alex.shi@linaro.org>2017-01-22 12:01:41 +0800
commit261e8dbdb94baf294d0c8d45de843bb3d928c90e (patch)
tree43e9e62c40fd1776ac8763e711bafe14839de724 /virt
parent75dd1c226c98dc1b4ad1bcf78746f4843c3fa1c4 (diff)
parenta7dd347a67c0ee738dda3c421d82ce8414be8c38 (diff)
downloadlinux-linaro-stable-261e8dbdb94baf294d0c8d45de843bb3d928c90e.tar.gz
Merge tag 'v4.4.44' into linux-linaro-lsk-v4.4
This is the 4.4.44 stable release
Diffstat (limited to 'virt')
-rw-r--r--virt/lib/irqbypass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/virt/lib/irqbypass.c b/virt/lib/irqbypass.c
index 09a03b5a21ff..e5d5dde6bf75 100644
--- a/virt/lib/irqbypass.c
+++ b/virt/lib/irqbypass.c
@@ -188,7 +188,7 @@ int irq_bypass_register_consumer(struct irq_bypass_consumer *consumer)
mutex_lock(&lock);
list_for_each_entry(tmp, &consumers, node) {
- if (tmp->token == consumer->token) {
+ if (tmp->token == consumer->token || tmp == consumer) {
mutex_unlock(&lock);
module_put(THIS_MODULE);
return -EBUSY;
@@ -235,7 +235,7 @@ void irq_bypass_unregister_consumer(struct irq_bypass_consumer *consumer)
mutex_lock(&lock);
list_for_each_entry(tmp, &consumers, node) {
- if (tmp->token != consumer->token)
+ if (tmp != consumer)
continue;
list_for_each_entry(producer, &producers, node) {