Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1669265 > unrolled thread

[PATCH 4.11 69/78] genirq: Release resources in __setup_irq() error path

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-06-19 17:30 +0200
Last post2017-06-19 17:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.11 69/78] genirq: Release resources in __setup_irq() error path Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-19 17:30 +0200

#1669265 — [PATCH 4.11 69/78] genirq: Release resources in __setup_irq() error path

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-19 17:30 +0200
Subject[PATCH 4.11 69/78] genirq: Release resources in __setup_irq() error path
Message-ID<tU6MQ-4pB-69@gated-at.bofh.it>
4.11-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Heiner Kallweit <hkallweit1@gmail.com>

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>

---
 kernel/irq/manage.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1310,8 +1310,10 @@ __setup_irq(unsigned int irq, struct irq
 			ret = __irq_set_trigger(desc,
 						new->flags & IRQF_TRIGGER_MASK);
 
-			if (ret)
+			if (ret) {
+				irq_release_resources(desc);
 				goto out_mask;
+			}
 		}
 
 		desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web