diff options
author | Daniel Scally <djrscally@gmail.com> | 2021-11-23 01:00:05 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-11-30 10:54:07 +0100 |
commit | ba0c8045ea62e4870883570c65d86f1bc06eaa4c (patch) | |
tree | ccffd4c08a730a724d08d05c85e08554fe0c2dcd /drivers/media/i2c | |
parent | 651d1f2040ac46d87c67cfe512bbd7668c34fec6 (diff) | |
download | linux-ba0c8045ea62e4870883570c65d86f1bc06eaa4c.tar.bz2 |
media: i2c: Defer probe if not endpoint found
The ov8865 driver is one of those that can be connected to a CIO2
device by the cio2-bridge code. This means that the absence of an
endpoint for this device is not necessarily fatal, as one might be
built by the cio2-bridge when it probes. Return -EPROBE_DEFER if no
endpoint is found rather than a fatal error.
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/ov8865.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c index a6372a0989e1..68fdb1ce1e94 100644 --- a/drivers/media/i2c/ov8865.c +++ b/drivers/media/i2c/ov8865.c @@ -2796,10 +2796,8 @@ static int ov8865_probe(struct i2c_client *client) /* Graph Endpoint */ handle = fwnode_graph_get_next_endpoint(dev_fwnode(dev), NULL); - if (!handle) { - dev_err(dev, "unable to find endpoint node\n"); - return -EINVAL; - } + if (!handle) + return -EPROBE_DEFER; sensor->endpoint.bus_type = V4L2_MBUS_CSI2_DPHY; |