]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: ov8865: Improve error logging when fwnode is not found
authorHans de Goede <hdegoede@redhat.com>
Mon, 23 Jun 2025 11:00:34 +0000 (13:00 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Mon, 30 Jun 2025 07:06:21 +0000 (09:06 +0200)
The ov8865 driver waits for the endpoint fwnode to show up in case this
fwnode is created by a bridge-driver.

It does this by returning -EPROBE_DEFER, but it does not use
dev_err_probe() so no reason for deferring gets registered.

After 30 seconds the kernel logs a warning that the probe is still
deferred, which looks like this:

[   33.952061] i2c i2c-INT347A:00: deferred probe pending: (reason unknown)

Use dev_err_probe() when returning -EPROBE_DEFER to register the probe
deferral reason changing the error to:

deferred probe pending: waiting for fwnode graph endpoint

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/ov8865.c

index 95ffe7536aa6aba814f4e5c3d12e7279470b2f07..a2138f7988aa55fbd3fa0f7bf2e7f533c779c9f3 100644 (file)
@@ -2991,7 +2991,8 @@ static int ov8865_probe(struct i2c_client *client)
 
        handle = fwnode_graph_get_next_endpoint(dev_fwnode(dev), NULL);
        if (!handle)
-               return -EPROBE_DEFER;
+               return dev_err_probe(dev, -EPROBE_DEFER,
+                                    "waiting for fwnode graph endpoint\n");
 
        sensor->endpoint.bus_type = V4L2_MBUS_CSI2_DPHY;