omap3isp: Ignore endpoints with invalid configuration
RFC 1/1 omap3isp: Ignore endpoints with invalid configuration
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.
---
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(-)
drivers/media/platform/omap3isp/isp.c +5 -3
@@ -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);
Signature · 1 line
2.7.4
Quoted 5 lines · Sakari Ailus
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.
Quoted 7 lines
Signed-off-by Sakari Ailus <[email protected]>---
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.
Does not seem to break anything.
Pavel
Quoted 23 lines
drivers/media/platform/omap3isp/isp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/media/platform/omap3isp/isp.c +5
-3@@ -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);
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Sakari Ailus
AppliedQuoted 1 line · Pavel Machek
Tested-by Pavel Machek <[email protected]>
Thanks!
I've applied the patch, plus yours, to the ccp2 branch.
Signature · 2 lines
Sakari Ailus [email protected]
Quoted 6 lines · Sakari Ailus
Quoted 1 line · Pavel Machek
Tested-by Pavel Machek <[email protected]>Thanks!
I've applied the patch, plus yours, to the ccp2 branch.
Thanks!
https://git.linuxtv.org/sailus/media_tree.git/log/?h=ccp2 ? I don't see recent changes there...
Best regards,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 4 lines · Pavel Machek
Quoted 3 lines · Sakari Ailus
Quoted 1 line · Pavel Machek
Tested-by Pavel Machek <[email protected]>
Quoted 8 lines
Quoted 3 lines
Thanks!
I've applied the patch, plus yours, to the ccp2 branch.
Thanks!
https://git.linuxtv.org/sailus/media_tree.git/log/?h=ccp2 ? I don't see recent changes there...
I accidentally pushed it to a wrong place. Pushing again...
Signature · 2 lines
Sakari Ailus [email protected]
Quoted 7 lines · Sakari Ailus
Quoted 6 lines · Pavel Machek
Quoted 5 lines · Sakari Ailus
Quoted 1 line · Pavel Machek
Tested-by Pavel Machek <[email protected]>Thanks!
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
I've applied the patch, plus yours, to the ccp2 branch.
Thanks!
https://git.linuxtv.org/sailus/media_tree.git/log/?h=ccp2 ? I don't see recent changes there...
I accidentally pushed it to a wrong place. Pushing again...
Thanks, I see it now.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html