lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1507057753-31808-1-git-send-email-steve_longerbeam@mentor.com>
Date:   Tue,  3 Oct 2017 12:09:13 -0700
From:   Steve Longerbeam <slongerbeam@...il.com>
To:     Philipp Zabel <p.zabel@...gutronix.de>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Russell King <rmk+kernel@...linux.org.uk>
Cc:     linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org,
        Steve Longerbeam <steve_longerbeam@...tor.com>
Subject: [PATCH] media: staging/imx: do not return error in link_notify for unknown sources

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@...tor.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ