diff options
author | Shuah Khan <shuah@kernel.org> | 2019-02-22 19:17:09 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-03-19 14:01:08 -0400 |
commit | 3eb87773dee63309967b1d4d8b9896f4e4fdd640 (patch) | |
tree | 07fe579cb1f481a854f0d78df9f3de595812cf65 /drivers/media/media-entity.c | |
parent | e855165f3dae6f71da859a5f00b85d5368641d61 (diff) | |
download | linux-3eb87773dee63309967b1d4d8b9896f4e4fdd640.tar.bz2 |
media: replace WARN_ON in __media_pipeline_start()
__media_pipeline_start() does WARN_ON() when active pipe doesn't
match the input arg entity's pipe.
Replace WARN_ON with a conditional and error message that includes
names of both entities.
Signed-off-by: Shuah Khan <shuah@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/media-entity.c')
-rw-r--r-- | drivers/media/media-entity.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index dd859d7b235a..a998a2e0ea1d 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c @@ -435,7 +435,10 @@ __must_check int __media_pipeline_start(struct media_entity *entity, entity->stream_count++; - if (WARN_ON(entity->pipe && entity->pipe != pipe)) { + if (entity->pipe && entity->pipe != pipe) { + pr_err("Pipe active for %s. Can't start for %s\n", + entity->name, + entity_err->name); ret = -EBUSY; goto error; } |