public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for David Daney <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mark.rutland@arm.com, marc.zyngier@arm.com, tglx@linutronix.de,
	hpa@zytor.com, linus.walleij@linaro.org, david.daney@cavium.com,
	linux-kernel@vger.kernel.org, gnurou@gmail.com, mingo@kernel.org
Subject: [tip:irq/core] irqdomain: Check for NULL function pointer in irq_domain_free_irqs_hierarchy()
Date: Fri, 18 Aug 2017 02:28:49 -0700	[thread overview]
Message-ID: <tip-0d12ec075a18f53e6f58ec95a4f534da2641bf9b@git.kernel.org> (raw)
In-Reply-To: <1503017616-3252-5-git-send-email-david.daney@cavium.com>

Commit-ID:  0d12ec075a18f53e6f58ec95a4f534da2641bf9b
Gitweb:     http://git.kernel.org/tip/0d12ec075a18f53e6f58ec95a4f534da2641bf9b
Author:     David Daney <david.daney@cavium.com>
AuthorDate: Thu, 17 Aug 2017 17:53:33 -0700
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 18 Aug 2017 11:21:42 +0200

irqdomain: Check for NULL function pointer in irq_domain_free_irqs_hierarchy()

A follow-on patch will call irq_domain_free_irqs_hierarchy() when the
free() function pointer may be NULL.

Add a NULL pointer check to handle this new use case.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Link: http://lkml.kernel.org/r/1503017616-3252-5-git-send-email-david.daney@cavium.com

---
 kernel/irq/irqdomain.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 2093b88..24fda75 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1362,7 +1362,8 @@ static void irq_domain_free_irqs_hierarchy(struct irq_domain *domain,
 					   unsigned int irq_base,
 					   unsigned int nr_irqs)
 {
-	domain->ops->free(domain, irq_base, nr_irqs);
+	if (domain->ops->free)
+		domain->ops->free(domain, irq_base, nr_irqs);
 }
 
 int irq_domain_alloc_irqs_hierarchy(struct irq_domain *domain,

  parent reply	other threads:[~2017-08-18  9:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-18  0:53 [PATCH v8 0/7] genirq/gpio: Add driver for ThunderX and OCTEON-TX SoCs David Daney
2017-08-18  0:53 ` [PATCH v8 1/7] genirq: Export more irq_chip_*_parent() functions David Daney
2017-08-18  9:27   ` [tip:irq/core] " tip-bot for David Daney
2017-08-18  0:53 ` [PATCH v8 2/7] genirq: Add handle_fasteoi_{level,edge}_irq flow handlers David Daney
2017-08-18  9:28   ` [tip:irq/core] " tip-bot for David Daney
2017-08-18  9:28   ` [PATCH v8 2/7] " Marc Zyngier
2017-08-18  9:32     ` Thomas Gleixner
2017-08-18  0:53 ` [PATCH v8 3/7] irqdomain: Factor out code to add and remove items to and from the revmap David Daney
2017-08-18  9:15   ` Marc Zyngier
2017-08-18  9:28   ` [tip:irq/core] " tip-bot for David Daney
2017-08-18  0:53 ` [PATCH v8 4/7] irqdomain: Check for NULL function pointer in irq_domain_free_irqs_hierarchy() David Daney
2017-08-18  9:16   ` Marc Zyngier
2017-08-18  9:28   ` tip-bot for David Daney [this message]
2017-08-18  0:53 ` [PATCH v8 5/7] irqdomain: Add irq_domain_{push,pop}_irq() functions David Daney
2017-08-18  9:17   ` Marc Zyngier
2017-08-18  9:29   ` [tip:irq/core] " tip-bot for David Daney
2017-08-18  0:53 ` [PATCH v8 6/7] gpio: Add gpio driver support for ThunderX and OCTEON-TX David Daney
2017-08-22 12:29   ` Linus Walleij
2017-08-18  0:53 ` [PATCH v8 7/7] MAINTAINERS: Add entry for THUNDERX GPIO Driver David Daney
2017-08-22 12:30   ` Linus Walleij
2017-08-18  9:24 ` [PATCH v8 0/7] genirq/gpio: Add driver for ThunderX and OCTEON-TX SoCs Thomas Gleixner
2017-08-18 18:07   ` David Daney
2017-08-20  9:36     ` Thomas Gleixner
2017-08-22 12:32     ` Linus Walleij

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=tip-0d12ec075a18f53e6f58ec95a4f534da2641bf9b@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=david.daney@cavium.com \
    --cc=gnurou@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=mingo@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