[PATCH v2 3/3] genirq: remove unnedded NULL check in __irq_domain_[de]activate_irq()
From: Kemeng Shi
Date: Wed Jul 01 2026 - 23:55:16 EST
Both __irq_domain_deactivate_irq() and __irq_domain_activate_irq() are
static functions whose callers always pass a valid irq_data pointer, as
evidenced by the callers either dereferencing it or performing a NULL
check before invoking these functions. The redundant NULL check on
irq_data can therefore be removed.
Signed-off-by: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx>
---
kernel/irq/irqdomain.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 8bd86deacf0c..19c18fae6d52 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1962,7 +1962,7 @@ EXPORT_SYMBOL_GPL(irq_domain_free_irqs_parent);
static void __irq_domain_deactivate_irq(struct irq_data *irq_data)
{
- if (irq_data && irq_data->domain) {
+ if (irq_data->domain) {
struct irq_domain *domain = irq_data->domain;
if (domain->ops->deactivate)
@@ -1976,7 +1976,7 @@ static int __irq_domain_activate_irq(struct irq_data *irqd, bool reserve)
{
int ret = 0;
- if (irqd && irqd->domain) {
+ if (irqd->domain) {
struct irq_domain *domain = irqd->domain;
if (irqd->parent_data)
--
2.36.1