From: tip-bot for Heiner Kallweit <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, linux-kernel@vger.kernel.org,
hkallweit1@gmail.com, mingo@kernel.org, tglx@linutronix.de
Subject: [tip:irq/urgent] genirq: Release resources in __setup_irq() error path
Date: Mon, 12 Jun 2017 15:43:24 -0700 [thread overview]
Message-ID: <tip-fa07ab72cbb0d843429e61bf179308aed6cbe0dd@git.kernel.org> (raw)
In-Reply-To: <655538f5-cb20-a892-ff15-fbd2dd1fa4ec@gmail.com>
Commit-ID: fa07ab72cbb0d843429e61bf179308aed6cbe0dd
Gitweb: http://git.kernel.org/tip/fa07ab72cbb0d843429e61bf179308aed6cbe0dd
Author: Heiner Kallweit <hkallweit1@gmail.com>
AuthorDate: Sun, 11 Jun 2017 00:38:36 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 13 Jun 2017 00:40:39 +0200
genirq: Release resources in __setup_irq() error path
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>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/655538f5-cb20-a892-ff15-fbd2dd1fa4ec@gmail.com
---
kernel/irq/manage.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 070be98..425170d 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1312,8 +1312,10 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
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 | \
prev parent reply other threads:[~2017-06-12 22:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-10 22:38 [PATCH] genirq: fix error path in __setup_irq Heiner Kallweit
2017-06-12 22:43 ` tip-bot for Heiner Kallweit [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-fa07ab72cbb0d843429e61bf179308aed6cbe0dd@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hkallweit1@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox