Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Chen Ni and committed by
Hans Verkuil
4caf6d93 4f0200f0

+4 -1
+4 -1
drivers/media/platform/qcom/camss/camss.c
··· 1695 1695 struct v4l2_mbus_config_mipi_csi2 *mipi_csi2; 1696 1696 struct v4l2_fwnode_endpoint vep = { { 0 } }; 1697 1697 unsigned int i; 1698 + int ret; 1698 1699 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; 1700 1703 1701 1704 csd->interface.csiphy_id = vep.base.port; 1702 1705