]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
genirq: Remove redundant NULL pointer check in __free_irq()
authorRAGHU Halharvi <raghuhack78@gmail.com>
Tue, 17 Jul 2018 10:20:09 +0000 (15:50 +0530)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 17 Jul 2018 11:35:44 +0000 (13:35 +0200)
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
kernel/irq/manage.c

index 1f8be33572a75c4c1de9417a88b0524bd6532ac5..a66c58f91bff5582c3b36e577b11a15ffc86ae52 100644 (file)
@@ -1570,9 +1570,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);