From 2b2d1d403343838401af029bd29b441a414beef3 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Mon, 23 Jan 2017 19:16:56 -0200 Subject: [PATCH] [media] exynos4-is: Add missing 'of_node_put' It is likely that a "of_node_put(ep)" is missing here. There is one in the previous error handling code, and one a few lines below in the normal case as well. Signed-off-by: Christophe JAILLET Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/exynos4-is/media-dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index 735221a5b6b4..e82450e90a67 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -402,8 +402,10 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd, return ret; } - if (WARN_ON(endpoint.base.port == 0) || index >= FIMC_MAX_SENSORS) + if (WARN_ON(endpoint.base.port == 0) || index >= FIMC_MAX_SENSORS) { + of_node_put(ep); return -EINVAL; + } pd->mux_id = (endpoint.base.port - 1) & 0x1; -- 2.39.5