On Tue Sep 29 12:27:00 2026 +0300, Ruslan Koreev wrote:
> 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 <[email protected]>
> Reviewed-by: Benjamin Mugnier <[email protected]>
> Signed-off-by: Sakari Ailus <[email protected]>

Patch committed.

Thanks,
Sakari Ailus

 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 22b1497e8851..8043eaa50f3d 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)
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to