Skip to contentSkip to conversation

genirq/irqdomain: Remove redundant NULL pointer check on fwnode

PATCH Applied Zenghui Yu 2 participants 2 messages Jul 16, 2020 – Jul 17, 2020

Subsystems (3)
lore
Share & tools
lore

Zenghui Yu

author
#0 lore raw

PATCH 1/1 genirq/irqdomain: Remove redundant NULL pointer check on fwnode

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.

---
 kernel/irq/irqdomain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/irqdomain.c +1 -1
index a4c2c915511d..155460fc0147 100644
@@ -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) {
Signature · 1 line
2.19.1
Applied
#1 lore raw
Quoted 2 lines · 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.

Applied to irq/irqchip-5.9, thanks!

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

      commit: 47903428b0e9db7a6251aa696fd1b2fc5de98545

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.