summaryrefslogtreecommitdiff
path: root/media.c
diff options
context:
space:
mode:
Diffstat (limited to 'media.c')
-rw-r--r--media.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/media.c b/media.c
index 75ca24c..d5d98de 100644
--- a/media.c
+++ b/media.c
@@ -424,11 +424,11 @@ static int media_enum_links(struct media_device *media)
id, i, link->source.entity, link->source.index,
link->sink.entity, link->sink.index);
ret = -EINVAL;
+ } else {
+ entity->links[i].source = &source->pads[link->source.index];
+ entity->links[i].sink = &sink->pads[link->sink.index];
+ entity->links[i].flags = links.links[i].flags;
}
-
- entity->links[i].source = &source->pads[link->source.index];
- entity->links[i].sink = &sink->pads[link->sink.index];
- entity->links[i].flags = links.links[i].flags;
}
free(links.pads);