Skip to content

Commit b9ace06

Browse files
elfringtsbogend
authored andcommitted
MIPS: SGI-IP27: Delete an unnecessary check before kfree() in hub_domain_free()
It can be known that the function “kfree” performs a null pointer check for its input parameter. It is therefore not needed to repeat such a check before its call. Thus remove a redundant pointer check. The source code was transformed by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 01557e3 commit b9ace06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/sgi-ip27/ip27-irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static void hub_domain_free(struct irq_domain *domain,
165165
return;
166166

167167
irqd = irq_domain_get_irq_data(domain, virq);
168-
if (irqd && irqd->chip_data)
168+
if (irqd)
169169
kfree(irqd->chip_data);
170170
}
171171

0 commit comments

Comments
 (0)