diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2020-07-07 04:12:50 +0200 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-07-17 14:41:42 +0200 |
commit | b10cbca8f03dd10dc241395a639d488f4144e986 (patch) | |
tree | 2e3223ebcf79d9908056d71ba3ad22b400be07e8 /drivers | |
parent | irqchip/loongson-pch-pic: Check return value of irq_domain_translate_twocell() (diff) | |
download | linux-b10cbca8f03dd10dc241395a639d488f4144e986.tar.xz linux-b10cbca8f03dd10dc241395a639d488f4144e986.zip |
irqchip/loongson-pch-msi: Remove unneeded variable
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>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1594087972-21715-7-git-send-email-yangtiezhu@loongson.cn
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/irqchip/irq-loongson-pch-msi.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/irqchip/irq-loongson-pch-msi.c b/drivers/irqchip/irq-loongson-pch-msi.c index 50becd21008c..12aeeab43289 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, |