[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240828122724.3697447-1-lihongbo22@huawei.com>
Date: Wed, 28 Aug 2024 20:27:24 +0800
From: Hongbo Li <lihongbo22@...wei.com>
To: <tglx@...utronix.de>
CC: <lihongbo22@...wei.com>, <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] irqdomain: Use IS_ERR_OR_NULL() helper function
Use the IS_ERR_OR_NULL() helper instead of open-coding a
NULL and an error pointer checks to simplify the code and
improve readability.
Signed-off-by: Hongbo Li <lihongbo22@...wei.com>
---
kernel/irq/irqdomain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 5df8780100bb..e0bff21f30e0 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -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;
/*
--
2.34.1
Powered by blists - more mailing lists