]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
MIPS: SGI-IP27: Delete an unnecessary check before kfree() in hub_domain_free()
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 10 Jun 2025 09:44:20 +0000 (11:44 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 16 Jul 2025 16:54:16 +0000 (18:54 +0200)
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>
arch/mips/sgi-ip27/ip27-irq.c

index 288d4d17edddee496a36d9721b0c346267f19bde..20ef663af16e25e1c49edc405439831da4854188 100644 (file)
@@ -165,7 +165,7 @@ static void hub_domain_free(struct irq_domain *domain,
                return;
 
        irqd = irq_domain_get_irq_data(domain, virq);
-       if (irqd && irqd->chip_data)
+       if (irqd)
                kfree(irqd->chip_data);
 }