diff options
| author | Dave Airlie <[email protected]> | 2021-06-23 00:07:48 +0000 |
|---|---|---|
| committer | Dave Airlie <[email protected]> | 2021-06-23 00:07:48 +0000 |
| commit | f45fbbb6d5cff29ddfc708676ec1c2496eed3a07 (patch) | |
| tree | 5496fee9f6b10da368aa49b03612061156e42d2f /virt/lib/irqbypass.c | |
| parent | Merge tag 'amd-drm-next-5.14-2021-06-16' of https://gitlab.freedesktop.org/ag... (diff) | |
| parent | Linux 5.13-rc7 (diff) | |
| download | kernel-f45fbbb6d5cff29ddfc708676ec1c2496eed3a07.tar.gz kernel-f45fbbb6d5cff29ddfc708676ec1c2496eed3a07.zip | |
Backmerge tag 'v5.13-rc7' into drm-next
Backmerge Linux 5.13-rc7 to make some pulls from later bases apply,
and to bake in the conflicts so far.
Diffstat (limited to 'virt/lib/irqbypass.c')
| -rw-r--r-- | virt/lib/irqbypass.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/virt/lib/irqbypass.c b/virt/lib/irqbypass.c index c9bb3957f58a..28fda42e471b 100644 --- a/virt/lib/irqbypass.c +++ b/virt/lib/irqbypass.c @@ -40,21 +40,17 @@ static int __connect(struct irq_bypass_producer *prod, if (prod->add_consumer) ret = prod->add_consumer(prod, cons); - if (ret) - goto err_add_consumer; - - ret = cons->add_producer(cons, prod); - if (ret) - goto err_add_producer; + if (!ret) { + ret = cons->add_producer(cons, prod); + if (ret && prod->del_consumer) + prod->del_consumer(prod, cons); + } if (cons->start) cons->start(cons); if (prod->start) prod->start(prod); -err_add_producer: - if (prod->del_consumer) - prod->del_consumer(prod, cons); -err_add_consumer: + return ret; } |
