Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75f8136c authored by Chen Ni's avatar Chen Ni Committed by Greg Kroah-Hartman
Browse files

media: qcom: camss: Add check for v4l2_fwnode_endpoint_parse



[ Upstream commit 4caf6d93d9f2c11d6441c64e1c549c445fa322ed ]

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: default avatarChen Ni <nichen@iscas.ac.cn>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c7167cbb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -431,8 +431,11 @@ static int camss_of_parse_endpoint_node(struct device *dev,
	struct v4l2_fwnode_bus_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;