PCI: xilinx-cpm: Fix reference count leak on error path
authorPan Bian <bianpan2016@163.com>
Wed, 20 Jan 2021 14:37:45 +0000 (06:37 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:11 +0000 (11:38 +0100)
commit6a96a4413dcc85b09509f6fe87e74f9dd30cb2ce
tree47eef451f99f76aea27365c00ce2ed0f56471c80
parent58516ac4aac8890cfc8327f82bbaf3c00ae9cb89
PCI: xilinx-cpm: Fix reference count leak on error path

[ Upstream commit ae191d2e513ae5274224777ae67018a584074a28 ]

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

Link: https://lore.kernel.org/r/20210120143745.699-1-bianpan2016@163.com
Fixes: 508f610648b9 ("PCI: xilinx-cpm: Add Versal CPM Root Port driver")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/pcie-xilinx-cpm.c