summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-12-15 09:04:14 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 12:19:16 -0200
commit1630b832355399dd0dc4fcc2cadbcad47153a748 (patch)
tree3755576565df7165e6ee87d40788e1740af540d4 /drivers/media
parenta5c82e5622d1b7f479c9a43873c2c5ac1f67765c (diff)
downloadlinux-1630b832355399dd0dc4fcc2cadbcad47153a748.tar.bz2
[media] v4l2-device: fix a missing error code
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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/v4l2-core/v4l2-device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-device.c b/drivers/media/v4l2-core/v4l2-device.c
index 2aa72aba4f17..06fa5f1b2cff 100644
--- a/drivers/media/v4l2-core/v4l2-device.c
+++ b/drivers/media/v4l2-core/v4l2-device.c
@@ -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;