Skip to contentSkip to conversation

irqchip/gic: remove a if in gic_of_setup()

PATCH New Yejune Deng 1 participant 1 message Dec 30, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqchip/gic: remove a if in gic_of_setup()

There is two function gic_of_init() and gic_of_init_child() called gic_of_setup(),both gic and node never fail,so remove if (!gic || !node) is safe.

---
 drivers/irqchip/irq-gic.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/irqchip/irq-gic.c +0 -3
index b1d9c22..a65678f0 100644
@@ -1380,9 +1380,6 @@ static bool gic_check_eoimode(struct device_node *node, void __iomem **base)
 
 static int gic_of_setup(struct gic_chip_data *gic, struct device_node *node)
 {
-	if (!gic || !node)
-		return -EINVAL;
-
 	gic->raw_dist_base = of_iomap(node, 0);
 	if (WARN(!gic->raw_dist_base, "unable to map gic dist registers\n"))
 		goto error;
Signature · 1 line
1.9.1