genirq:free_irq:remove redundant null ptr check
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 genirq:free_irq:remove redundant null ptr check
* Remove the misleading null pointer check in __free_irq, its redundant because the callee checks before calling __free_irq.
Signed-off-by RAGHU Halharvi <[email protected]>
--- kernel/irq/manage.c | 3 --- 1 file changed, 3 deletions(-)
kernel/irq/manage.c +0 -3
@@ -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);
Signature · 1 line
2.17.1
tip-bot for RAGHU Halharvi
merge bot[tip:irq/core] genirq: Remove redundant NULL pointer check in __free_irq()
genirq: Remove redundant NULL pointer check in __free_irq()
Commit-ID: d91cfeb0aa79445fcfa9f523a5b57c5e9f4113ec Gitweb: https://git.kernel.org/tip/d91cfeb0aa79445fcfa9f523a5b57c5e9f4113ec Author: RAGHU Halharvi <[email protected]> AuthorDate: Tue, 17 Jul 2018 15:50:09 +0530 Committer: Thomas Gleixner <[email protected]> CommitDate: Tue, 17 Jul 2018 13:35:44 +0200
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 <[email protected]>
Signed-off-by Thomas Gleixner <[email protected]>
--- kernel/irq/manage.c | 3 --- 1 file changed, 3 deletions(-)
kernel/irq/manage.c +0 -3
@@ -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);