summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-09-29 17:38:39 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-11 13:04:26 -0500
commit7d4b6f5590b47b8bc040d63863088d67a9fb17f4 (patch)
tree9844b978d50788d36391030271ce5b16a1581dcc /drivers/staging/media
parent7bf7a7116ed313c601307f7e585419369926ab05 (diff)
downloadlinux-stable-7d4b6f5590b47b8bc040d63863088d67a9fb17f4.tar.gz
linux-stable-7d4b6f5590b47b8bc040d63863088d67a9fb17f4.tar.bz2
linux-stable-7d4b6f5590b47b8bc040d63863088d67a9fb17f4.zip
media: staging/imx: fix complete handler
The complete handler walks all entities, expecting to find an imx subdevice for each and every entity. However, camera drivers such as smiapp can themselves contain multiple entities, for which there will not be an imx subdevice. This causes imx_media_find_subdev_by_sd() to fail, making the imx capture system unusable with such cameras. Work around this by killing the error entirely, thereby allowing the imx capture to be used with such cameras. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Acked-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r--drivers/staging/media/imx/imx-media-dev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c
index 47c4c954fed5..6a773c76cd9e 100644
--- a/drivers/staging/media/imx/imx-media-dev.c
+++ b/drivers/staging/media/imx/imx-media-dev.c
@@ -345,8 +345,11 @@ static int imx_media_add_vdev_to_pad(struct imx_media_dev *imxmd,
sd = media_entity_to_v4l2_subdev(entity);
imxsd = imx_media_find_subdev_by_sd(imxmd, sd);
- if (IS_ERR(imxsd))
- return PTR_ERR(imxsd);
+ if (IS_ERR(imxsd)) {
+ v4l2_err(&imxmd->v4l2_dev, "failed to find subdev for entity %s, sd %p err %ld\n",
+ entity->name, sd, PTR_ERR(imxsd));
+ return 0;
+ }
imxpad = &imxsd->pad[srcpad->index];
vdev_idx = imxpad->num_vdevs;