diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-03-04 17:20:12 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-04-13 16:23:14 -0300 |
commit | 5790a1589f746d5648825d3bc8367f0ce7b12784 (patch) | |
tree | dbe2df77215f83983437ae105ba6d40534d63821 /drivers/media/platform/exynos4-is | |
parent | 7e8da343a31623decc7fd0ee66700ba50260aca7 (diff) |
[media] exynos4-is: Put node before s5pcsis_parse_dt() return error
The MIPI CSIS DT parse function return an -ENXIO errno if the port #
is outside of the supported values. But it doesn't call of_node_put()
to decrement the node's reference counter, that's incremented inside
the of_graph_get_next_endpoint() function that was called before.
Instead of just returning, go to the error path that already does it.
Signed-off-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/exynos4-is')
-rw-r--r-- | drivers/media/platform/exynos4-is/mipi-csis.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c index bd5c46c3d4b7..bf954424e7be 100644 --- a/drivers/media/platform/exynos4-is/mipi-csis.c +++ b/drivers/media/platform/exynos4-is/mipi-csis.c @@ -757,8 +757,10 @@ static int s5pcsis_parse_dt(struct platform_device *pdev, goto err; state->index = endpoint.base.port - FIMC_INPUT_MIPI_CSI2_0; - if (state->index >= CSIS_MAX_ENTITIES) - return -ENXIO; + if (state->index >= CSIS_MAX_ENTITIES) { + ret = -ENXIO; + goto err; + } /* Get MIPI CSI-2 bus configration from the endpoint node. */ of_property_read_u32(node, "samsung,csis-hs-settle", |