Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <elfring@users.sourceforge.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Markus Elfring and committed by
Thomas Bogendoerfer
b9ace064 01557e34

+1 -1
+1 -1
arch/mips/sgi-ip27/ip27-irq.c
··· 165 165 return; 166 166 167 167 irqd = irq_domain_get_irq_data(domain, virq); 168 - if (irqd && irqd->chip_data) 168 + if (irqd) 169 169 kfree(irqd->chip_data); 170 170 } 171 171