summaryrefslogtreecommitdiffstats
path: root/drivers/media/media-entity.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-20 01:18:35 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 15:18:46 +0100
commit8f6d368f726bb4fa069af5ef5806f15ba6da6ad8 (patch)
treebf9dd61f3760cb9744f6558fc4a6fde4a90bdbf9 /drivers/media/media-entity.c
parent[media] smiapp: create pad links after subdev registration (diff)
downloadlinux-8f6d368f726bb4fa069af5ef5806f15ba6da6ad8.tar.xz
linux-8f6d368f726bb4fa069af5ef5806f15ba6da6ad8.zip
[media] media: Don't accept early-created links
Links are graph objects that represent the links of two already existing objects in the graph. While with the current implementation, it is possible to create the links earlier, It doesn't make any sense to allow linking two objects when they are not both created. So, remove the code that would be handling those early-created links and add a BUG_ON() to ensure that. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/media-entity.c')
-rw-r--r--drivers/media/media-entity.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
index 160ce2cc0865..f85a711d4958 100644
--- a/drivers/media/media-entity.c
+++ b/drivers/media/media-entity.c
@@ -149,6 +149,8 @@ void media_gobj_init(struct media_device *mdev,
enum media_gobj_type type,
struct media_gobj *gobj)
{
+ BUG_ON(!mdev);
+
gobj->mdev = mdev;
/* Create a per-type unique object ID */