media: exynos4-is: Add missing of_node_put to fix reference leaks
Drop the reference to "parallel-ports" and remote endpoint's parent nodes obtained previously with of_get_child_by_name() and of_get_parent() respectively. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
2f39cce963
commit
4a96f5e10e
|
@ -449,6 +449,7 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
|
||||||
pd->fimc_bus_type = FIMC_BUS_TYPE_ISP_WRITEBACK;
|
pd->fimc_bus_type = FIMC_BUS_TYPE_ISP_WRITEBACK;
|
||||||
else
|
else
|
||||||
pd->fimc_bus_type = pd->sensor_bus_type;
|
pd->fimc_bus_type = pd->sensor_bus_type;
|
||||||
|
of_node_put(np);
|
||||||
|
|
||||||
if (WARN_ON(index >= ARRAY_SIZE(fmd->sensor))) {
|
if (WARN_ON(index >= ARRAY_SIZE(fmd->sensor))) {
|
||||||
of_node_put(rem);
|
of_node_put(rem);
|
||||||
|
@ -474,7 +475,8 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
|
||||||
static int fimc_md_register_sensor_entities(struct fimc_md *fmd)
|
static int fimc_md_register_sensor_entities(struct fimc_md *fmd)
|
||||||
{
|
{
|
||||||
struct device_node *parent = fmd->pdev->dev.of_node;
|
struct device_node *parent = fmd->pdev->dev.of_node;
|
||||||
struct device_node *node, *ports;
|
struct device_node *ports = NULL;
|
||||||
|
struct device_node *node;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -523,12 +525,14 @@ static int fimc_md_register_sensor_entities(struct fimc_md *fmd)
|
||||||
}
|
}
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
of_node_put(ports);
|
||||||
|
|
||||||
rpm_put:
|
rpm_put:
|
||||||
pm_runtime_put(fmd->pmf);
|
pm_runtime_put(fmd->pmf);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
of_node_put(ports);
|
||||||
v4l2_async_notifier_cleanup(&fmd->subdev_notifier);
|
v4l2_async_notifier_cleanup(&fmd->subdev_notifier);
|
||||||
pm_runtime_put(fmd->pmf);
|
pm_runtime_put(fmd->pmf);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue