Skip to content

Commit dbf641a

Browse files
Wan Jiabingbroonie
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 531558b commit dbf641a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/spi/spi-orion.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,7 @@ static int orion_spi_probe(struct platform_device *pdev)
769769
dir_acc->vaddr = devm_ioremap(&pdev->dev, r->start, PAGE_SIZE);
770770
if (!dir_acc->vaddr) {
771771
status = -ENOMEM;
772+
of_node_put(np);
772773
goto out_rel_axi_clk;
773774
}
774775
dir_acc->size = PAGE_SIZE;

0 commit comments

Comments
 (0)