Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1303790 > unrolled thread

[PATCH 4/8] [media] s5k5baf: Check v4l2_of_parse_endpoint() return value

Started byJavier Martinez Canillas <javier@osg.samsung.com>
First post2016-01-07 19:30 +0100
Last post2016-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.


Contents

  [PATCH 4/8] [media] s5k5baf: Check v4l2_of_parse_endpoint() return value Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-07 19:30 +0100

#1303790 — [PATCH 4/8] [media] s5k5baf: Check v4l2_of_parse_endpoint() return value

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-01-07 19:30 +0100
Subject[PATCH 4/8] [media] s5k5baf: Check v4l2_of_parse_endpoint() return value
Message-ID<qOntW-3ug-53@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/s5k5baf.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
index fc3a5a8e6c9c..db82ed05792e 100644
--- a/drivers/media/i2c/s5k5baf.c
+++ b/drivers/media/i2c/s5k5baf.c
@@ -1868,8 +1868,11 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
 		return -EINVAL;
 	}
 
-	v4l2_of_parse_endpoint(node_ep, &ep);
+	ret = v4l2_of_parse_endpoint(node_ep, &ep);
 	of_node_put(node_ep);
+	if (ret)
+		return ret;
+
 	state->bus_type = ep.bus_type;
 
 	switch (state->bus_type) {
-- 
2.4.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web