linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: staging/imx: do not return error in link_notify for unknown sources
@ 2017-10-03 19:09 Steve Longerbeam
  2017-10-11 21:49 ` Russell King - ARM Linux
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Longerbeam @ 2017-10-03 19:09 UTC (permalink / raw)
  To: Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Russell King
  Cc: linux-media, devel, linux-kernel, Steve Longerbeam

imx_media_link_notify() should not return error if the source subdevice
is not recognized by imx-media, that isn't an error. If the subdev has
controls they will be inherited starting from a known subdev.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
 drivers/staging/media/imx/imx-media-dev.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c
index b55e5eb..dd47861 100644
--- a/drivers/staging/media/imx/imx-media-dev.c
+++ b/drivers/staging/media/imx/imx-media-dev.c
@@ -508,8 +508,15 @@ static int imx_media_link_notify(struct media_link *link, u32 flags,
 	imxmd = dev_get_drvdata(sd->v4l2_dev->dev);
 
 	imxsd = imx_media_find_subdev_by_sd(imxmd, sd);
-	if (IS_ERR(imxsd))
-		return PTR_ERR(imxsd);
+	if (IS_ERR(imxsd)) {
+		/*
+		 * don't bother if the source subdev isn't known to
+		 * imx-media. If the subdev has controls they will be
+		 * inherited starting from a known subdev.
+		 */
+		return 0;
+	}
+
 	imxpad = &imxsd->pad[pad_idx];
 
 	/*
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-11 23:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-03 19:09 [PATCH] media: staging/imx: do not return error in link_notify for unknown sources Steve Longerbeam
2017-10-11 21:49 ` Russell King - ARM Linux
2017-10-11 22:14   ` Steve Longerbeam
2017-10-11 23:06     ` Russell King - ARM Linux
2017-10-11 23:14       ` Steve Longerbeam
2017-10-11 23:27       ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).