media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop
Subsystems (3)
PATCH 1/1 media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop
In fimc_is_register_subdevs(), we need to call of_node_put() for the reference 'i2c_bus' when breaking out of the for_each_compatible_node() which has increased the refcount.
Fixes 9a761e436843 ("[media] exynos4-is: Add Exynos4x12 FIMC-IS driver")
Signed-off-by Liang He <[email protected]>
---
while commit-9a761e436843 is not the one using current nested
for_each_*, it also did not calll of_node_put() when breaking out of loop for the out_side for_each_*.
drivers/media/platform/samsung/exynos4-is/fimc-is.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/platform/samsung/exynos4-is/fimc-is.c +1 -0
@@ -213,6 +213,7 @@ static int fimc_is_register_subdevs(struct fimc_is *is)if (ret <0 || index >=FIMC_IS_SENSORS_NUM ) {of_node_put (child); +of_node_put (i2c_bus);return ret; } index++;
Signature · 1 line
2.25.1