summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2022-07-19 17:10:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-18 13:30:16 +0300
commit62fac7d912044b72a24da170b1ed2901f7ad0f39 (patch)
tree28bab30518920a046db5f992be352938394a4850 /drivers/media
parent6282a76f71dd21d79607c4a241cca81a44387d98 (diff)
downloadlinux-62fac7d912044b72a24da170b1ed2901f7ad0f39.tar.xz
media: c8sectpfe: Add of_node_put() when breaking out of loop
[ Upstream commit 63ff05a1ad242a5a0f897921c87b70d601bda59c ] In configure_channels(), we should call of_node_put() when breaking out of for_each_child_of_node() which will automatically increase and decrease the refcount. Fixes: c5f5d0f99794 ("[media] c8sectpfe: STiH407/10 Linux DVB demux support") Signed-off-by: Liang He <windhl@126.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 3c05b3dc49ec..98c14565bbfd 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -943,6 +943,7 @@ static int configure_channels(struct c8sectpfei *fei)
if (ret) {
dev_err(fei->dev,
"configure_memdma_and_inputblock failed\n");
+ of_node_put(child);
goto err_unmap;
}
index++;