summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/exynos4-is
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-05-31 16:37:23 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-13 02:58:29 +0200
commit36da6fcdc52eae6f06f6a3fde9f8395187222162 (patch)
tree4c6cc184dfee43a7e16b8f00fd2fba404ddd72f0 /drivers/media/platform/exynos4-is
parent[media] exynos4-is: Use common exynos_media_pipeline data structure (diff)
downloadlinux-36da6fcdc52eae6f06f6a3fde9f8395187222162.tar.xz
linux-36da6fcdc52eae6f06f6a3fde9f8395187222162.zip
[media] exynos4-is: Remove WARN_ON() from __fimc_pipeline_close()
It's not a critical error to call __fimc_pipeline_close() with missing sensor subdev entity. Replace WARN_ON() with pr_warn() and return 0 instead of -EINVAL to fix control flow in some conditions. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is')
-rw-r--r--drivers/media/platform/exynos4-is/media-dev.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index 2020e44f63b1..5b307f26f995 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -220,16 +220,16 @@ static int __fimc_pipeline_close(struct exynos_media_pipeline *ep)
struct fimc_pipeline *p = to_fimc_pipeline(ep);
struct v4l2_subdev *sd = p ? p->subdevs[IDX_SENSOR] : NULL;
struct fimc_md *fmd;
- int ret = 0;
-
- if (WARN_ON(sd == NULL))
- return -EINVAL;
+ int ret;
- if (p->subdevs[IDX_SENSOR]) {
- ret = fimc_pipeline_s_power(p, 0);
- fimc_md_set_camclk(sd, false);
+ if (sd == NULL) {
+ pr_warn("%s(): No sensor subdev\n", __func__);
+ return 0;
}
+ ret = fimc_pipeline_s_power(p, 0);
+ fimc_md_set_camclk(sd, false);
+
fmd = entity_to_fimc_mdev(&sd->entity);
/* Disable PXLASYNC clock if this pipeline includes FIMC-IS */