]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
irqdomain: Use IS_ERR_OR_NULL() in irq_domain_trim_hierarchy()
authorHongbo Li <lihongbo22@huawei.com>
Wed, 28 Aug 2024 12:27:24 +0000 (20:27 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 29 Aug 2024 14:42:07 +0000 (16:42 +0200)
Use IS_ERR_OR_NULL() instead of open-coding a NULL and a error pointer
check.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240828122724.3697447-1-lihongbo22@huawei.com
kernel/irq/irqdomain.c

index 5df8780100bb188830bc9ae02ee78c5896f776fb..e0bff21f30e0a997464b48cc2bdfa67196d76009 100644 (file)
@@ -1403,7 +1403,7 @@ static int irq_domain_trim_hierarchy(unsigned int virq)
        tail = NULL;
 
        /* The first entry must have a valid irqchip */
-       if (!irq_data->chip || IS_ERR(irq_data->chip))
+       if (IS_ERR_OR_NULL(irq_data->chip))
                return -EINVAL;
 
        /*