summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-mbigen.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-08-01 21:21:00 +0300
committerThomas Gleixner <tglx@linutronix.de>2019-08-01 21:21:00 +0300
commita5dbba8f443e2046c63e5dd2907f562c1179169f (patch)
tree7825828ccd3cee5d0ae442d1560c32d44ff2a0d0 /drivers/irqchip/irq-mbigen.c
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff)
parentb5fa9fc9e809f84bb20439730162eccfed906a76 (diff)
downloadlinux-a5dbba8f443e2046c63e5dd2907f562c1179169f.tar.xz
Merge tag 'irqchip-fixes-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
Pull irqchip fixes from Marc Zyngier: A small bunch of fixes from the irqchip department: - Fix a couple of UAF on error paths (RZA1, GICv3 ITS) - Fix iMX GPCv2 trigger setting - Add missing of_node_put on error path in MBIGEN - Add another bunch of /* fall-through */ to silence warnings
Diffstat (limited to 'drivers/irqchip/irq-mbigen.c')
-rw-r--r--drivers/irqchip/irq-mbigen.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
index 3dd28382d5f5..3f09f658e8e2 100644
--- a/drivers/irqchip/irq-mbigen.c
+++ b/drivers/irqchip/irq-mbigen.c
@@ -241,12 +241,15 @@ static int mbigen_of_create_domain(struct platform_device *pdev,
parent = platform_bus_type.dev_root;
child = of_platform_device_create(np, NULL, parent);
- if (!child)
+ if (!child) {
+ of_node_put(np);
return -ENOMEM;
+ }
if (of_property_read_u32(child->dev.of_node, "num-pins",
&num_pins) < 0) {
dev_err(&pdev->dev, "No num-pins property\n");
+ of_node_put(np);
return -EINVAL;
}
@@ -254,8 +257,10 @@ static int mbigen_of_create_domain(struct platform_device *pdev,
mbigen_write_msg,
&mbigen_domain_ops,
mgn_chip);
- if (!domain)
+ if (!domain) {
+ of_node_put(np);
return -ENOMEM;
+ }
}
return 0;