From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: pavel@ucw.cz
Subject: [RFC 1/1] omap3isp: Ignore endpoints with invalid configuration
Date: Tue, 28 Feb 2017 14:02:30 +0200 [thread overview]
Message-ID: <1488283350-5695-1-git-send-email-sakari.ailus@linux.intel.com> (raw)
If endpoint has an invalid configuration, ignore it instead of happily
proceeding to use it nonetheless. Ignoring such an endpoint is better than
failing since there could be multiple endpoints, only some of which are
bad.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
Hi Pavel,
How about this one? isp_fwnode_parse() is expected to return an error if
there's one but currently it's quite shy. With this patch, the faulty
endpoint is simply ignored. This is completely untested so far.
drivers/media/platform/omap3isp/isp.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index 95850b9..8026221 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -2120,10 +2120,12 @@ static int isp_fwnodes_parse(struct device *dev,
if (!isd)
goto error;
- notifier->subdevs[notifier->num_subdevs] = &isd->asd;
+ if (isp_fwnode_parse(dev, fwn, isd)) {
+ devm_kfree(dev, isd);
+ continue;
+ }
- if (isp_fwnode_parse(dev, fwn, isd))
- goto error;
+ notifier->subdevs[notifier->num_subdevs] = &isd->asd;
isd->asd.match.fwnode.fwn =
fwnode_graph_get_remote_port_parent(fwn);
--
2.7.4
next reply other threads:[~2017-02-28 12:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 12:02 Sakari Ailus [this message]
2017-02-28 12:35 ` [RFC 1/1] omap3isp: Ignore endpoints with invalid configuration Pavel Machek
2017-02-28 12:45 ` Sakari Ailus
2017-02-28 19:30 ` Pavel Machek
2017-03-01 7:33 ` Sakari Ailus
2017-03-01 10:37 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1488283350-5695-1-git-send-email-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=linux-media@vger.kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).