From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Marc Zyngier <maz@kernel.org>, Rob Herring <robh+dt@kernel.org>
Cc: Guo Ren <guoren@kernel.org>, Baruch Siach <baruch@tkos.co.il>,
Huacai Chen <chenhc@lemote.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Tony Lindgren <tony@atomide.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>, Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Michal Simek <michal.simek@xilinx.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-mips@vger.kernel.org, Xuefeng Li <lixuefeng@loongson.cn>
Subject: [PATCH 5/7 RESEND] irqchip/loongson-pch-msi: Remove unneeded variable
Date: Tue, 23 Jun 2020 17:01:45 +0800 [thread overview]
Message-ID: <1592902907-5062-6-git-send-email-yangtiezhu@loongson.cn> (raw)
In-Reply-To: <1592902907-5062-1-git-send-email-yangtiezhu@loongson.cn>
irq_domain_alloc_irqs_parent() returns 0 on success and non-zero value
on failure, it is redudant to check its non-zero return value and then
return it, so just remove the variable "ret" and return directly in the
function pch_msi_parent_domain_alloc().
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/irqchip/irq-loongson-pch-msi.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/irqchip/irq-loongson-pch-msi.c b/drivers/irqchip/irq-loongson-pch-msi.c
index 50becd2..12aeeab 100644
--- a/drivers/irqchip/irq-loongson-pch-msi.c
+++ b/drivers/irqchip/irq-loongson-pch-msi.c
@@ -100,17 +100,12 @@ static int pch_msi_parent_domain_alloc(struct irq_domain *domain,
unsigned int virq, int hwirq)
{
struct irq_fwspec fwspec;
- int ret;
fwspec.fwnode = domain->parent->fwnode;
fwspec.param_count = 1;
fwspec.param[0] = hwirq;
- ret = irq_domain_alloc_irqs_parent(domain, virq, 1, &fwspec);
- if (ret)
- return ret;
-
- return 0;
+ return irq_domain_alloc_irqs_parent(domain, virq, 1, &fwspec);
}
static int pch_msi_middle_domain_alloc(struct irq_domain *domain,
--
2.1.0
next prev parent reply other threads:[~2020-06-23 9:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 9:01 [PATCH 0/7 RESEND] Fix potential resource leaks and do some code cleanups about irqchip Tiezhu Yang
2020-06-23 9:01 ` [PATCH 1/7 RESEND] irqchip: Fix potential resource leaks Tiezhu Yang
2020-06-23 9:01 ` [PATCH 2/7 RESEND] irqchip/loongson-htpic: Remove redundant kfree operation Tiezhu Yang
2020-06-23 9:01 ` [PATCH 3/7 RESEND] irqchip/loongson-htvec: Check return value of irq_domain_translate_onecell() Tiezhu Yang
2020-06-23 9:01 ` [PATCH 4/7 RESEND] irqchip/loongson-pch-pic: Check return value of irq_domain_translate_twocell() Tiezhu Yang
2020-06-23 9:01 ` Tiezhu Yang [this message]
2020-06-23 9:01 ` [PATCH 6/7 RESEND] irqchip/loongson-htpic: Remove unneeded select of I8259 Tiezhu Yang
2020-06-23 9:06 [PATCH 0/7 RESEND] Fix potential resource leaks and do some code cleanups about irqchip Tiezhu Yang
2020-06-23 9:06 ` [PATCH 5/7 RESEND] irqchip/loongson-pch-msi: Remove unneeded variable Tiezhu Yang
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=1592902907-5062-6-git-send-email-yangtiezhu@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=aou@eecs.berkeley.edu \
--cc=baruch@tkos.co.il \
--cc=chenhc@lemote.com \
--cc=devicetree@vger.kernel.org \
--cc=guoren@kernel.org \
--cc=jason@lakedaemon.net \
--cc=jiaxun.yang@flygoat.com \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=maz@kernel.org \
--cc=michal.simek@xilinx.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
--cc=tony@atomide.com \
/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;
as well as URLs for NNTP newsgroup(s).