summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-06-11 00:38:36 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-26 07:10:53 +0200
commitb773ff26285d2fd221e3674fcea0fd80b0852da8 (patch)
tree66dabce02bc8b363df58bcaa6d43fc7b51a8b772 /kernel
parent0c5450e5d64a79d3e6f08ecc5d80cda264b14d88 (diff)
downloadlinux-rt-b773ff26285d2fd221e3674fcea0fd80b0852da8.tar.gz
genirq: Release resources in __setup_irq() error path
commit fa07ab72cbb0d843429e61bf179308aed6cbe0dd upstream. In case __irq_set_trigger() fails the resources requested via irq_request_resources() are not released. Add the missing release call into the error handling path. Fixes: c1bacbae8192 ("genirq: Provide irq_request/release_resources chip callbacks") Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/655538f5-cb20-a892-ff15-fbd2dd1fa4ec@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/manage.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 0a9104b4608b..e7ef539c56d9 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1156,8 +1156,10 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
ret = __irq_set_trigger(desc, irq,
new->flags & IRQF_TRIGGER_MASK);
- if (ret)
+ if (ret) {
+ irq_release_resources(desc);
goto out_mask;
+ }
}
desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \