]> www.infradead.org Git - users/hch/misc.git/commitdiff
media: mc: Fix MUST_CONNECT handling for pads with no links
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 20 Aug 2025 14:00:20 +0000 (17:00 +0300)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 25 Aug 2025 13:40:44 +0000 (15:40 +0200)
Commit b3decc5ce7d7 ("media: mc: Expand MUST_CONNECT flag to always
require an enabled link") expanded the meaning of the MUST_CONNECT flag
to require an enabled link in all cases. To do so, the link exploration
code was expanded to cover unconnected pads, in order to reject those
that have the MUST_CONNECT flag set. The implementation was however
incorrect, ignoring unconnected pads instead of ignoring connected pads.
Fix it.

Reported-by: Martin Kepplinger-Novaković <martink@posteo.de>
Closes: https://lore.kernel.org/linux-media/20250205172957.182362-1-martink@posteo.de
Reported-by: Maud Spierings <maudspierings@gocontroll.com>
Closes: https://lore.kernel.org/linux-media/20250818-imx8_isi-v1-1-e9cfe994c435@gocontroll.com
Fixes: b3decc5ce7d7 ("media: mc: Expand MUST_CONNECT flag to always require an enabled link")
Cc: stable@vger.kernel.org # 6.1
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Maud Spierings <maudspierings@gocontroll.com>
Tested-by: Martin Kepplinger-Novaković <martink@posteo.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/mc/mc-entity.c

index 045590905582054c46656e20463271b1f93fa6b4..307920c8b35492b2820b0daefffcfdc792c2cb96 100644 (file)
@@ -691,7 +691,7 @@ done:
                 * (already discovered through iterating over links) and pads
                 * not internally connected.
                 */
-               if (origin == local || !local->num_links ||
+               if (origin == local || local->num_links ||
                    !media_entity_has_pad_interdep(origin->entity, origin->index,
                                                   local->index))
                        continue;