Skip to content

Commit d91cfeb

Browse files
raghuhack78KAGA-KOKO
authored andcommitted
genirq: Remove redundant NULL pointer check in __free_irq()
The NULL pointer check in __free_irq() triggers a 'dereference before NULL pointer check' warning in static code analysis. It turns out that the check is redundant because all callers have a NULL pointer check already. Remove it. Signed-off-by: RAGHU Halharvi <raghuhack78@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20180717102009.7708-1-raghuhack78@gmail.com
1 parent 519cc86 commit d91cfeb

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎kernel/irq/manage.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,9 +1570,6 @@ static struct irqaction *__free_irq(struct irq_desc *desc, void *dev_id)
15701570

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

1573-
if (!desc)
1574-
return NULL;
1575-
15761573
mutex_lock(&desc->request_mutex);
15771574
chip_bus_lock(desc);
15781575
raw_spin_lock_irqsave(&desc->lock, flags);

0 commit comments

Comments
 (0)