Re: [PATCH v2 3/4] media: i2c: vd55g1: Return the endpoint parser's error code

From: Benjamin Mugnier

Date: Wed Sep 30 2026 - 04:04:42 EST


Hi Ruslan,

Le 29/09/2026 à 11:27, Ruslan Koreev a écrit :
> Pass the endpoint to v4l2_fwnode_endpoint_alloc_parse() without checking
> it first and return the parser's error code instead of -EINVAL. The
> parser returns -EPROBE_DEFER for a missing endpoint, which is what a
> sensor on an ACPI system needs: there the endpoint is a software node
> that the IPU bridge attaches when the IPU driver probes, possibly after
> this driver. On OF systems a missing endpoint now defers the probe as
> well instead of failing it, as in other sensor drivers that leave this
> check to the parser.
>
> Signed-off-by: Ruslan Koreev <koreev.r@xxxxxxxxx>

Reviewed-By: Benjamin Mugnier <benjamin.mugnier@xxxxxxxxxxx>

> ---
> drivers/media/i2c/vd55g1.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/media/i2c/vd55g1.c b/drivers/media/i2c/vd55g1.c
> index 22b1497e8..8043eaa50 100644
> --- a/drivers/media/i2c/vd55g1.c
> +++ b/drivers/media/i2c/vd55g1.c
> @@ -1801,7 +1801,7 @@ static int vd55g1_check_csi_conf(struct vd55g1 *sensor,
>
> ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &ep);
> if (ret)
> - return -EINVAL;
> + return ret;
>
> /* Check lanes number */
> n_lanes = ep.bus.mipi_csi2.num_data_lanes;
> @@ -1905,11 +1905,6 @@ static int vd55g1_parse_dt(struct vd55g1 *sensor)
>
> endpoint = fwnode_graph_get_endpoint_by_id(dev_fwnode(sensor->dev),
> 0, 0, 0);
> - if (!endpoint) {
> - dev_err(sensor->dev, "Endpoint node not found\n");
> - return -EINVAL;
> - }
> -
> ret = vd55g1_check_csi_conf(sensor, endpoint);
> fwnode_handle_put(endpoint);
> if (ret)

--
Regards,
Benjamin