From: Markus Elfring Date: Tue, 10 Jun 2025 09:44:20 +0000 (+0200) Subject: MIPS: SGI-IP27: Delete an unnecessary check before kfree() in hub_domain_free() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b9ace0647f044042d88b30ea7bd5130e4ad626a2;p=users%2Fdwmw2%2Flinux.git 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 Signed-off-by: Thomas Bogendoerfer --- diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 288d4d17eddde..20ef663af16e2 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c @@ -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); }