Skip to contentSkip to conversation

media: replace WARN_ON in __media_pipeline_start()

PATCH New Shuah Khan 1 participant 1 message Feb 23, 2019 Media (V4L/DVB)

lore
Share & tools
lore

Shuah Khan

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/media/media-entity.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/media/media-entity.c +4 -1
index 0b1cb3559140..757c641b7409 100644
@@ -436,7 +436,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;
 		}
Signature · 1 line
2.17.1