Skip to contentSkip to conversation

media: c8sectpfe: Add of_node_put() when breaking out of loop

PATCH New Liang He 1 participant 1 message Jul 19, 2022 Media (V4L/DVB)

lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 media: c8sectpfe: Add of_node_put() when breaking out of loop

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")
---
 drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c +1 -0
index cefe6b7bfdc4..1dbb89f0ddb8 100644
@@ -925,6 +925,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++;
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel