Skip to content

Commit b10cbca

Browse files
seehearfeelMarc Zyngier
authored andcommitted
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 <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 66a535c commit b10cbca

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/irqchip/irq-loongson-pch-msi.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,12 @@ static int pch_msi_parent_domain_alloc(struct irq_domain *domain,
100100
unsigned int virq, int hwirq)
101101
{
102102
struct irq_fwspec fwspec;
103-
int ret;
104103

105104
fwspec.fwnode = domain->parent->fwnode;
106105
fwspec.param_count = 1;
107106
fwspec.param[0] = hwirq;
108107

109-
ret = irq_domain_alloc_irqs_parent(domain, virq, 1, &fwspec);
110-
if (ret)
111-
return ret;
112-
113-
return 0;
108+
return irq_domain_alloc_irqs_parent(domain, virq, 1, &fwspec);
114109
}
115110

116111
static int pch_msi_middle_domain_alloc(struct irq_domain *domain,

0 commit comments

Comments
 (0)