Skip to content

Commit 4caf6d9

Browse files
Chen NiHans Verkuil
authored andcommitted
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 <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 4f0200f commit 4caf6d9

File tree

1 file changed

+4
-1
lines changed
  • drivers/media/platform/qcom/camss

1 file changed

+4
-1
lines changed

drivers/media/platform/qcom/camss/camss.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,8 +1695,11 @@ static int camss_of_parse_endpoint_node(struct device *dev,
16951695
struct v4l2_mbus_config_mipi_csi2 *mipi_csi2;
16961696
struct v4l2_fwnode_endpoint vep = { { 0 } };
16971697
unsigned int i;
1698+
int ret;
16981699

1699-
v4l2_fwnode_endpoint_parse(of_fwnode_handle(node), &vep);
1700+
ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(node), &vep);
1701+
if (ret)
1702+
return ret;
17001703

17011704
csd->interface.csiphy_id = vep.base.port;
17021705

0 commit comments

Comments
 (0)