Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1350560
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] [media] exynos4-is: FIMC port parse should fail if there's no endpoint |
| Date | 2016-03-04 21:30 +0100 |
| Message-ID | <r94wi-3Jm-13@gated-at.bofh.it> (permalink) |
| References | <r94wi-3Jm-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The fimc_md_parse_port_node() function return 0 if an endpoint node is
not found but according to Documentation/devicetree/bindings/graph.txt,
a port must always have at least one enpoint.
So return an -EINVAL errno code to the caller instead, so it knows that
the port node parse failed due an invalid Device Tree description.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/media/platform/exynos4-is/media-dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index feb521f28e14..06f3d75c9a0e 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -394,7 +394,7 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
/* Assume here a port node can have only one endpoint node. */
ep = of_get_next_child(port, NULL);
if (!ep)
- return 0;
+ return -EINVAL;
ret = v4l2_of_parse_endpoint(ep, &endpoint);
if (ret) {
--
2.5.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 2/2] [media] exynos4-is: FIMC port parse should fail if there's no endpoint Javier Martinez Canillas <javier@osg.samsung.com> - 2016-03-04 21:30 +0100
Re: [PATCH 2/2] [media] exynos4-is: FIMC port parse should fail if there's no endpoint Sylwester Nawrocki <s.nawrocki@samsung.com> - 2016-03-11 14:10 +0100
Re: [PATCH 2/2] [media] exynos4-is: FIMC port parse should fail if there's no endpoint Javier Martinez Canillas <javier@dowhile0.org> - 2016-03-11 16:00 +0100
csiph-web