[PATCH] genirq:free_irq:remove redundant null ptr check

From: RAGHU Halharvi
Date: Tue Jul 17 2018 - 06:20:20 EST


* Remove the misleading null pointer check in __free_irq, its redundant because
the callee checks before calling __free_irq.

Signed-off-by: RAGHU Halharvi <raghuhack78@xxxxxxxxx>
---
kernel/irq/manage.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index facfecfc543c..7246f6c7f702 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1563,9 +1563,6 @@ static struct irqaction *__free_irq(struct irq_desc *desc, void *dev_id)

WARN(in_interrupt(), "Trying to free IRQ %d from IRQ context!\n", irq);

- if (!desc)
- return NULL;
-
mutex_lock(&desc->request_mutex);
chip_bus_lock(desc);
raw_spin_lock_irqsave(&desc->lock, flags);
--
2.17.1