]> git.itanic.dy.fi Git - linux-stable/commitdiff
media: c8sectpfe: Add of_node_put() when breaking out of loop
authorLiang He <windhl@126.com>
Tue, 19 Jul 2022 14:10:23 +0000 (22:10 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 7 Dec 2022 16:58:46 +0000 (17:58 +0100)
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>
drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c

index 4c5027a0480d874e5795c859fe8a97d2c8b6ee01..c38b62d4f1aee8cec36954246ada4194abe34d92 100644 (file)
@@ -927,6 +927,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++;