linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] genirq/irqdomain: Remove redundant NULL pointer check on fwnode
@ 2020-07-16  8:39 Zenghui Yu
  2020-07-17 12:48 ` Marc Zyngier
  0 siblings, 1 reply; 2+ messages in thread
From: Zenghui Yu @ 2020-07-16  8:39 UTC (permalink / raw)
  To: tglx, maz; +Cc: linux-kernel, wanghaibin.wang, Zenghui Yu

The is_fwnode_irqchip() helper will check if the fwnode_handle is empty.
There is no need to perform a redundant check outside of it.

Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
---
 kernel/irq/irqdomain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index a4c2c915511d..155460fc0147 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -142,7 +142,7 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,
 	if (!domain)
 		return NULL;
 
-	if (fwnode && is_fwnode_irqchip(fwnode)) {
+	if (is_fwnode_irqchip(fwnode)) {
 		fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
 
 		switch (fwid->type) {
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] genirq/irqdomain: Remove redundant NULL pointer check on fwnode
  2020-07-16  8:39 [PATCH] genirq/irqdomain: Remove redundant NULL pointer check on fwnode Zenghui Yu
@ 2020-07-17 12:48 ` Marc Zyngier
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2020-07-17 12:48 UTC (permalink / raw)
  To: Alexandre Torgue, Jason Cooper, Thomas Gleixner, Zenghui Yu
  Cc: linux-kernel, marex, linux-arm-kernel, linux-gpio, linux-stm32,
	wanghaibin.wang

On Thu, 16 Jul 2020 16:39:05 +0800, Zenghui Yu wrote:
> The is_fwnode_irqchip() helper will check if the fwnode_handle is empty.
> There is no need to perform a redundant check outside of it.

Applied to irq/irqchip-5.9, thanks!

[1/1] genirq/irqdomain: Remove redundant NULL pointer check on fwnode
      commit: 47903428b0e9db7a6251aa696fd1b2fc5de98545

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-17 12:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16  8:39 [PATCH] genirq/irqdomain: Remove redundant NULL pointer check on fwnode Zenghui Yu
2020-07-17 12:48 ` Marc Zyngier

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).