From: Dan Carpenter Date: Tue, 15 Dec 2015 11:04:14 +0000 (-0200) Subject: [media] v4l2-device: fix a missing error code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1630b832355399dd0dc4fcc2cadbcad47153a748;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Mauro Carvalho Chehab --- 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;