linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: RAGHU Halharvi <raghuhack78@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: RAGHU Halharvi <raghuhack78@gmail.com>, tglx@linutronix.de
Subject: [PATCH] genirq:free_irq:remove redundant null ptr check
Date: Tue, 17 Jul 2018 15:50:09 +0530	[thread overview]
Message-ID: <20180717102009.7708-1-raghuhack78@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1807171100590.3238@nanos.tec.linutronix.de>

* 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


       reply	other threads:[~2018-07-17 10:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.DEB.2.21.1807171100590.3238@nanos.tec.linutronix.de>
2018-07-17 10:20 ` RAGHU Halharvi [this message]
2018-07-17 11:39   ` [tip:irq/core] genirq: Remove redundant NULL pointer check in __free_irq() tip-bot for RAGHU Halharvi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180717102009.7708-1-raghuhack78@gmail.com \
    --to=raghuhack78@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).