* [PATCH] genirq:free_irq:remove redundant null ptr check [not found] <alpine.DEB.2.21.1807171100590.3238@nanos.tec.linutronix.de> @ 2018-07-17 10:20 ` RAGHU Halharvi 2018-07-17 11:39 ` [tip:irq/core] genirq: Remove redundant NULL pointer check in __free_irq() tip-bot for RAGHU Halharvi 0 siblings, 1 reply; 2+ messages in thread From: RAGHU Halharvi @ 2018-07-17 10:20 UTC (permalink / raw) To: linux-kernel; +Cc: RAGHU Halharvi, tglx * 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@gmail.com> --- 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 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip:irq/core] genirq: Remove redundant NULL pointer check in __free_irq() 2018-07-17 10:20 ` [PATCH] genirq:free_irq:remove redundant null ptr check RAGHU Halharvi @ 2018-07-17 11:39 ` tip-bot for RAGHU Halharvi 0 siblings, 0 replies; 2+ messages in thread From: tip-bot for RAGHU Halharvi @ 2018-07-17 11:39 UTC (permalink / raw) To: linux-tip-commits; +Cc: raghuhack78, mingo, linux-kernel, hpa, tglx Commit-ID: d91cfeb0aa79445fcfa9f523a5b57c5e9f4113ec Gitweb: https://git.kernel.org/tip/d91cfeb0aa79445fcfa9f523a5b57c5e9f4113ec Author: RAGHU Halharvi <raghuhack78@gmail.com> AuthorDate: Tue, 17 Jul 2018 15:50:09 +0530 Committer: Thomas Gleixner <tglx@linutronix.de> 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 <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 | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 1f8be33572a7..a66c58f91bff 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -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); ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-17 11:40 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <alpine.DEB.2.21.1807171100590.3238@nanos.tec.linutronix.de> 2018-07-17 10:20 ` [PATCH] genirq:free_irq:remove redundant null ptr check RAGHU Halharvi 2018-07-17 11:39 ` [tip:irq/core] genirq: Remove redundant NULL pointer check in __free_irq() tip-bot for RAGHU Halharvi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).