From: Chen Ni Date: Fri, 21 Jun 2024 01:35:22 +0000 (+0800) Subject: media: qcom: camss: Add check for v4l2_fwnode_endpoint_parse X-Git-Tag: v6.11-rc1~142^2~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4caf6d93d9f2c11d6441c64e1c549c445fa322ed;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index 1f1f44f6fbb2b..51b1d3550421a 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -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;