genirq/irqdomain: Remove redundant NULL pointer check on fwnode
authorZenghui Yu <yuzenghui@huawei.com>
Thu, 16 Jul 2020 08:39:05 +0000 (16:39 +0800)
committerMarc Zyngier <maz@kernel.org>
Mon, 27 Jul 2020 07:55:02 +0000 (08:55 +0100)
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>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200716083905.287-1-yuzenghui@huawei.com
kernel/irq/irqdomain.c

index a4c2c915511d3814a4984aca7338a0e9ebce861e..155460fc01473099bf6b379c25cd7b66b8c3fddf 100644 (file)
@@ -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) {