summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martinez Canillas2016-01-11 17:47:11 +0100
committerMauro Carvalho Chehab2016-02-01 13:02:17 +0100
commitfda8b13ddce96335de2c6ae46bd3b14829318afe (patch)
tree4cb9903a0c2f5ffd97ff441280bd898f43dac153
parent[media] adv7604: Check v4l2_of_parse_endpoint() return value (diff)
downloadkernel-qcow2-linux-fda8b13ddce96335de2c6ae46bd3b14829318afe.tar.gz
kernel-qcow2-linux-fda8b13ddce96335de2c6ae46bd3b14829318afe.tar.xz
kernel-qcow2-linux-fda8b13ddce96335de2c6ae46bd3b14829318afe.zip
[media] s5c73m3: Check v4l2_of_parse_endpoint() return value
The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/i2c/s5c73m3/s5c73m3-core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
index 57b3d27993a4..08af58fb8e7d 100644
--- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
+++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
@@ -1639,8 +1639,10 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
return 0;
}
- v4l2_of_parse_endpoint(node_ep, &ep);
+ ret = v4l2_of_parse_endpoint(node_ep, &ep);
of_node_put(node_ep);
+ if (ret)
+ return ret;
if (ep.bus_type != V4L2_MBUS_CSI2) {
dev_err(dev, "unsupported bus type\n");