[media] v4l2-device: fix a missing error code
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 Dec 2015 11:04:14 +0000 (09:04 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:19:16 +0000 (12:19 -0200)
We need to set "err = -ENOMEM" here.

Fixes: 38b11f19667a ('[media] v4l2-core: create MC interfaces for devnodes')

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/v4l2-device.c

index 2aa72aba4f172af958add1324089984b1c5966d0..06fa5f1b2cfffa833a54cc6eb6584cb0dbaa4be7 100644 (file)
@@ -267,8 +267,10 @@ int v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev)
                        link = media_create_intf_link(&sd->entity,
                                                      &vdev->intf_devnode->intf,
                                                      MEDIA_LNK_FL_ENABLED);
-                       if (!link)
+                       if (!link) {
+                               err = -ENOMEM;
                                goto clean_up;
+                       }
                }
 #endif
                sd->devnode = vdev;