summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-orion.c
diff options
context:
space:
mode:
authorWan Jiabing <wanjiabing@vivo.com>2021-10-15 06:40:08 +0300
committerMark Brown <broonie@kernel.org>2021-10-15 18:10:59 +0300
commitdbf641a10f6138fb84866d33ac05f9e1eae95e04 (patch)
tree962288cfca9fe6535f25e9633625df63e7f9365d /drivers/spi/spi-orion.c
parent531558b56be514f7e98b9ea2997b6197ee1af360 (diff)
downloadlinux-dbf641a10f6138fb84866d33ac05f9e1eae95e04.tar.xz
spi: orion: Add of_node_put() before goto
Fix following coccicheck warning: ./drivers/spi/spi-orion.c:738:1-33: WARNING: Function for_each_available_child_of_node should have of_node_put() before goto Early exits from for_each_available_child_of_node should decrement the node reference counter. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Link: https://lore.kernel.org/r/20211015034008.6357-1-wanjiabing@vivo.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-orion.c')
-rw-r--r--drivers/spi/spi-orion.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index e8de3cbbfb2a..565cd4c48d7b 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -769,6 +769,7 @@ static int orion_spi_probe(struct platform_device *pdev)
dir_acc->vaddr = devm_ioremap(&pdev->dev, r->start, PAGE_SIZE);
if (!dir_acc->vaddr) {
status = -ENOMEM;
+ of_node_put(np);
goto out_rel_axi_clk;
}
dir_acc->size = PAGE_SIZE;