aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2016-01-11 14:47:12 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-01 10:02:40 -0200
commit2388309c7480550e64e20221640f6a5c717be662 (patch)
treebada832985af071e55a2a23c98d19671ac0b4664 /drivers/media/i2c
parent[media] s5c73m3: Check v4l2_of_parse_endpoint() return value (diff)
downloadlinux-dev-2388309c7480550e64e20221640f6a5c717be662.tar.xz
linux-dev-2388309c7480550e64e20221640f6a5c717be662.zip
[media] s5k5baf: 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>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/s5k5baf.c5
1 files changed, 4 insertions, 1 deletions
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) {