Commit 36da6fcd authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 403dfbec
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -220,15 +220,15 @@ 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;
	int ret;

	if (WARN_ON(sd == NULL))
		return -EINVAL;
	if (sd == NULL) {
		pr_warn("%s(): No sensor subdev\n", __func__);
		return 0;
	}

	if (p->subdevs[IDX_SENSOR]) {
	ret = fimc_pipeline_s_power(p, 0);
	fimc_md_set_camclk(sd, false);
	}

	fmd = entity_to_fimc_mdev(&sd->entity);