diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2016-01-26 03:41:46 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-04-13 22:22:52 +0300 |
commit | 7e8da343a31623decc7fd0ee66700ba50260aca7 (patch) | |
tree | ecd537385776e09086c3643768cff809a11b8788 /drivers/media/platform | |
parent | bc5ccdbc990debbcae4602214dddc8d5fd38b01d (diff) | |
download | linux-7e8da343a31623decc7fd0ee66700ba50260aca7.tar.xz |
[media] exynos4-is: Add missing port parent of_node_put on error paths
In fimc_md_parse_port_node() remote port parent node is acquired with
of_graph_get_remote_port_parent() but it is not put on error path.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/exynos4-is/media-dev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index feb521f28e14..48f62dc4453e 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -446,8 +446,10 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd, else pd->fimc_bus_type = pd->sensor_bus_type; - if (WARN_ON(index >= ARRAY_SIZE(fmd->sensor))) + if (WARN_ON(index >= ARRAY_SIZE(fmd->sensor))) { + of_node_put(rem); return -EINVAL; + } fmd->sensor[index].asd.match_type = V4L2_ASYNC_MATCH_OF; fmd->sensor[index].asd.match.of.node = rem; |