We need to set "err = -ENOMEM" here.

Fixes: 38b11f19667a ('[media] v4l2-core: create MC interfaces for devnodes')
Signed-off-by: Dan Carpenter <[email protected]>

diff --git a/drivers/media/v4l2-core/v4l2-device.c 
b/drivers/media/v4l2-core/v4l2-device.c
index 85f724b..85b1e98 100644
--- a/drivers/media/v4l2-core/v4l2-device.c
+++ b/drivers/media/v4l2-core/v4l2-device.c
@@ -266,8 +266,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;
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to