aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/media-entity.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/media-entity.c')
-rw-r--r--drivers/media/media-entity.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
index 6926e0685d0a..4822763dcefa 100644
--- a/drivers/media/media-entity.c
+++ b/drivers/media/media-entity.c
@@ -323,7 +323,12 @@ __must_check int media_entity_pipeline_start(struct media_entity *entity,
DECLARE_BITMAP(has_no_links, MEDIA_ENTITY_MAX_PADS);
entity->stream_count++;
- WARN_ON(entity->pipe && entity->pipe != pipe);
+
+ if (WARN_ON(entity->pipe && entity->pipe != pipe)) {
+ ret = -EBUSY;
+ goto error;
+ }
+
entity->pipe = pipe;
/* Already streaming --- no need to check. */