Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1303791 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2016-01-07 19:30 +0100 |
| Last post | 2016-01-07 19:30 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/8] [media] adv7604: Check v4l2_of_parse_endpoint() return value Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-07 19:30 +0100
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-01-07 19:30 +0100 |
| Subject | [PATCH 2/8] [media] adv7604: Check v4l2_of_parse_endpoint() return value |
| Message-ID | <qOntV-3ug-41@gated-at.bofh.it> |
The v4l2_of_parse_endpoint() function can fail so check the return value.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/media/i2c/adv7604.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index f8dd7505b529..ed3eccd94285 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -2799,6 +2799,7 @@ static int adv76xx_parse_dt(struct adv76xx_state *state)
struct device_node *endpoint;
struct device_node *np;
unsigned int flags;
+ int ret;
u32 v;
np = state->i2c_clients[ADV76XX_PAGE_IO]->dev.of_node;
@@ -2808,7 +2809,11 @@ static int adv76xx_parse_dt(struct adv76xx_state *state)
if (!endpoint)
return -EINVAL;
- v4l2_of_parse_endpoint(endpoint, &bus_cfg);
+ ret = v4l2_of_parse_endpoint(endpoint, &bus_cfg);
+ if (ret) {
+ of_node_put(endpoint);
+ return ret;
+ }
if (!of_property_read_u32(endpoint, "default-input", &v))
state->pdata.default_input = v;
--
2.4.3
Back to top | Article view | linux.kernel
csiph-web