[media] exynos4-is: Add missing 'of_node_put'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 23 Jan 2017 21:16:56 +0000 (19:16 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 3 Feb 2017 16:23:40 +0000 (14:23 -0200)
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 <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/exynos4-is/media-dev.c

index 735221a5b6b4a1a1c9a4f6e2a1900303cb6cf92c..e82450e90a676db9ba1dafd410d0840d8f209c81 100644 (file)
@@ -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;