1

media: qcom: camss: Add check for v4l2_fwnode_endpoint_parse

Add check for the return value of v4l2_fwnode_endpoint_parse() and
return the error if it fails in order to catch the error.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
Chen Ni 2024-06-21 09:35:22 +08:00 committed by Hans Verkuil
parent 4f0200f0c3
commit 4caf6d93d9

View File

@ -1695,8 +1695,11 @@ static int camss_of_parse_endpoint_node(struct device *dev,
struct v4l2_mbus_config_mipi_csi2 *mipi_csi2;
struct v4l2_fwnode_endpoint vep = { { 0 } };
unsigned int i;
int ret;
v4l2_fwnode_endpoint_parse(of_fwnode_handle(node), &vep);
ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(node), &vep);
if (ret)
return ret;
csd->interface.csiphy_id = vep.base.port;