summaryrefslogtreecommitdiff
path: root/drivers/media/media-entity.c
diff options
context:
space:
mode:
authorHelen Mae Koike Fornazier <helen.koike@collabora.co.uk>2015-06-28 22:14:10 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-04-29 14:07:17 +0300
commit47dfdb3a888733ab76702fc2801b6715c9d77937 (patch)
treee2bfbbb1704837f5d53e2887d33d5a7dc1e59de4 /drivers/media/media-entity.c
parent45c175c4ae9695d6d2f30a45ab7f3866cfac184b (diff)
downloadlinux-47dfdb3a888733ab76702fc2801b6715c9d77937.tar.xz
[media] media: change pipeline validation return error
According to the V4L2 API, the VIDIOC_STREAMON ioctl should return EPIPE if there is a format mismatch in the pipeline configuration. As the .vidioc_streamon in the v4l2_ioctl_ops usually forwards the error caused by the v4l2_subdev_link_validate_default (if it is in use), it should return -EPIPE when it detect the mismatch. When an entity is connected to a non enabled link, media_entity_pipeline_start should return -ENOLINK, as the link does not exist. Signed-off-by: Helen Mae Koike Fornazier <helen.koike@collabora.co.uk> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/media-entity.c')
-rw-r--r--drivers/media/media-entity.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
index c53c1d5589a0..d8a2299f0c2a 100644
--- a/drivers/media/media-entity.c
+++ b/drivers/media/media-entity.c
@@ -445,7 +445,7 @@ __must_check int __media_entity_pipeline_start(struct media_entity *entity,
bitmap_or(active, active, has_no_links, entity->num_pads);
if (!bitmap_full(active, entity->num_pads)) {
- ret = -EPIPE;
+ ret = -ENOLINK;
dev_dbg(entity->graph_obj.mdev->dev,
"\"%s\":%u must be connected by an enabled link\n",
entity->name,