LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Joseph Lo <josephl@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
Nicolas Chauvet <kwizart@gmail.com>
Subject: [PATCH v3 5/8] clocksource/drivers/tegra: Release all IRQ's on request_irq() error
Date: Fri, 24 May 2019 18:32:50 +0300 [thread overview]
Message-ID: <20190524153253.28564-6-digetx@gmail.com> (raw)
In-Reply-To: <20190524153253.28564-1-digetx@gmail.com>
Release all requested IRQ's on the request error to properly clean up
allocated resources.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
drivers/clocksource/timer-tegra20.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/timer-tegra20.c b/drivers/clocksource/timer-tegra20.c
index 55e9b3e1fbeb..18b81d814b3b 100644
--- a/drivers/clocksource/timer-tegra20.c
+++ b/drivers/clocksource/timer-tegra20.c
@@ -293,7 +293,7 @@ static int __init tegra_init_timer(struct device_node *np, bool tegra20)
pr_err("%s: can't map IRQ for CPU%d\n",
__func__, cpu);
ret = -EINVAL;
- goto out;
+ goto out_irq;
}
irq_set_status_flags(cpu_to->clkevt.irq, IRQ_NOAUTOEN);
@@ -303,7 +303,8 @@ static int __init tegra_init_timer(struct device_node *np, bool tegra20)
if (ret) {
pr_err("%s: cannot setup irq %d for CPU%d\n",
__func__, cpu_to->clkevt.irq, cpu);
- ret = -EINVAL;
+ irq_dispose_mapping(cpu_to->clkevt.irq);
+ cpu_to->clkevt.irq = 0;
goto out_irq;
}
}
--
2.21.0
next prev parent reply other threads:[~2019-05-24 15:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 15:32 [PATCH v3 0/8] NVIDIA Tegra clocksource driver improvements Dmitry Osipenko
2019-05-24 15:32 ` [PATCH v3 1/8] clocksource/drivers/tegra: Support per-CPU timers on all Tegra's Dmitry Osipenko
2019-05-24 15:32 ` [PATCH v3 2/8] clocksource/drivers/tegra: Unify timer code Dmitry Osipenko
2019-05-24 15:32 ` [PATCH v3 3/8] clocksource/drivers/tegra: Reset hardware state on init Dmitry Osipenko
2019-05-24 15:32 ` [PATCH v3 4/8] clocksource/drivers/tegra: Replace readl/writel with relaxed versions Dmitry Osipenko
2019-05-24 15:32 ` Dmitry Osipenko [this message]
2019-05-24 15:32 ` [PATCH v3 6/8] clocksource/drivers/tegra: Minor code clean up Dmitry Osipenko
2019-05-24 15:32 ` [PATCH v3 7/8] clocksource/drivers/tegra: Use SPDX identifier Dmitry Osipenko
2019-05-24 15:32 ` [PATCH v3 8/8] clocksource/drivers/tegra: Support COMPILE_TEST universally Dmitry Osipenko
2019-05-31 8:26 ` [PATCH v3 0/8] NVIDIA Tegra clocksource driver improvements Peter De Schrijver
2019-05-31 12:33 ` Dmitry Osipenko
2019-05-31 20:31 ` Daniel Lezcano
2019-06-01 13:00 ` Dmitry Osipenko
2019-06-03 7:17 ` Peter De Schrijver
2019-06-03 11:14 ` Dmitry Osipenko
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=20190524153253.28564-6-digetx@gmail.com \
--to=digetx@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=jonathanh@nvidia.com \
--cc=josephl@nvidia.com \
--cc=kwizart@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=pdeschrijver@nvidia.com \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
--subject='Re: [PATCH v3 5/8] clocksource/drivers/tegra: Release all IRQ'\''s on request_irq() error' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).