提交 2388309c 编写于 作者: J Javier Martinez Canillas 提交者: Mauro Carvalho Chehab

[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: NJavier Martinez Canillas <javier@osg.samsung.com>
Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 fda8b13d
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册