aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform/video-mux.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/video-mux.c')
-rw-r--r--drivers/media/platform/video-mux.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/platform/video-mux.c b/drivers/media/platform/video-mux.c
index f7e2a5e48ccf..905005e271ca 100644
--- a/drivers/media/platform/video-mux.c
+++ b/drivers/media/platform/video-mux.c
@@ -364,7 +364,7 @@ static int video_mux_async_register(struct video_mux *vmux,
for (i = 0; i < num_input_pads; i++) {
struct v4l2_async_subdev *asd;
- struct fwnode_handle *ep;
+ struct fwnode_handle *ep, *remote_ep;
ep = fwnode_graph_get_endpoint_by_id(
dev_fwnode(vmux->subdev.dev), i, 0,
@@ -372,6 +372,14 @@ static int video_mux_async_register(struct video_mux *vmux,
if (!ep)
continue;
+ /* Skip dangling endpoints for backwards compatibility */
+ remote_ep = fwnode_graph_get_remote_endpoint(ep);
+ if (!remote_ep) {
+ fwnode_handle_put(ep);
+ continue;
+ }
+ fwnode_handle_put(remote_ep);
+
asd = v4l2_async_notifier_add_fwnode_remote_subdev(
&vmux->notifier, ep, struct v4l2_async_subdev);