public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] [media] v4l2-device: fix a missing error code
@ 2015-12-15 11:04 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-12-15 11:04 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Hans Verkuil, Sakari Ailus, Tommi Franttila, linux-media,
	kernel-janitors

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>

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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-15 11:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-15 11:04 [patch] [media] v4l2-device: fix a missing error code Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox