diff options
Diffstat (limited to 'drivers/media')
-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 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; |