summaryrefslogtreecommitdiff
path: root/drivers/media/media-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/media-device.c')
-rw-r--r--drivers/media/media-device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index 14bd568e2f41..b8cd7733a31c 100644
--- a/drivers/media/media-device.c
+++ b/drivers/media/media-device.c
@@ -623,6 +623,8 @@ int __must_check media_device_register_entity(struct media_device *mdev,
WARN_ON(entity->graph_obj.mdev != NULL);
entity->graph_obj.mdev = mdev;
INIT_LIST_HEAD(&entity->links);
+ entity->num_links = 0;
+ entity->num_backlinks = 0;
spin_lock(&mdev->lock);
/* Initialize media_gobj embedded at the entity */