]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: mc: fix endpoint iteration
authorCosmin Tanislav <demonsingur@gmail.com>
Fri, 22 Nov 2024 14:55:24 +0000 (16:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:30 +0000 (12:50 +0100)
commit9a6c627f3fe4624aba1e3d81e1fa95e70568d3ae
tree31015e0c483fb5387d99a56ce0618ecf41813d7e
parent9e6cd5f99496f840cd7cc24bb47876e17d150d1f
media: mc: fix endpoint iteration

commit fb2bd86270cd0ad004f4c614ba4f8c63a5720e25 upstream.

When creating links from a subdev to a sink, the current logic tries to
iterate over the endpoints of dev's fwnode.

This might not be correct when the subdev uses a different fwnode
compared to the dev's fwnode.

If, when registering, the subdev's fwnode is not set, the code inside
v4l2_async_register_subdev will set it to the dev's fwnode.

To fix this, just use the subdev's fwnode.

Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Fixes: 0d3c81e82da9 ("media: v4l2-mc: add v4l2_create_fwnode_links helpers")
Cc: stable@vger.kernel.org
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/v4l2-core/v4l2-mc.c