[PATCH] media: avoid skipping MEDIA_PAD_FL_MUST_CONNECT logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In the current code, __media_pipeline_start() skips check of
MEDIA_PAD_FL_MUST_CONNECT logic for entity not providing link_validate()
op.

Fix that by checking for existence of link_validate() at different code
location.

Signed-off-by: Nikita Yushchenko <nikita.yoush@xxxxxxxxxxxxxxxxxx>
---
 drivers/media/mc/mc-entity.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/mc/mc-entity.c b/drivers/media/mc/mc-entity.c
index a998a2e0ea1d..8b4912be30d1 100644
--- a/drivers/media/mc/mc-entity.c
+++ b/drivers/media/mc/mc-entity.c
@@ -449,9 +449,6 @@ __must_check int __media_pipeline_start(struct media_entity *entity,
 		if (entity->stream_count > 1)
 			continue;
 
-		if (!entity->ops || !entity->ops->link_validate)
-			continue;
-
 		bitmap_zero(active, entity->num_pads);
 		bitmap_fill(has_no_links, entity->num_pads);
 
@@ -479,6 +476,9 @@ __must_check int __media_pipeline_start(struct media_entity *entity,
 			    !(link->flags & MEDIA_LNK_FL_ENABLED))
 				continue;
 
+			if (!entity->ops || !entity->ops->link_validate)
+				continue;
+
 			ret = entity->ops->link_validate(link);
 			if (ret < 0 && ret != -ENOIOCTLCMD) {
 				dev_dbg(entity->graph_obj.mdev->dev,
-- 
2.11.0




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux