提交 ae191d2e 编写于 作者: P Pan Bian 提交者: Lorenzo Pieralisi

PCI: xilinx-cpm: Fix reference count leak on error path

Also drop the reference count of the node on error path.

Link: https://lore.kernel.org/r/20210120143745.699-1-bianpan2016@163.com
Fixes: 508f6106 ("PCI: xilinx-cpm: Add Versal CPM Root Port driver")
Signed-off-by: NPan Bian <bianpan2016@163.com>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
上级 7c53f6b6
......@@ -404,6 +404,7 @@ static int xilinx_cpm_pcie_init_irq_domain(struct xilinx_cpm_pcie_port *port)
return 0;
out:
xilinx_cpm_free_irq_domains(port);
of_node_put(pcie_intc_node);
dev_err(dev, "Failed to allocate IRQ domains\n");
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册