summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/imx335.c
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2023-12-11 15:59:45 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-12-13 15:21:21 +0300
commit1af87779e9f7dcdd4f219b355ae090ca18028540 (patch)
tree5013b507f34830e10a63dac8db0fe3113bee76e4 /drivers/media/i2c/imx335.c
parentd5ca45b8b91ea40696aaceb3f93d207b25b26d50 (diff)
downloadlinux-1af87779e9f7dcdd4f219b355ae090ca18028540.tar.xz
media: i2c: imx335: Improve configuration error reporting
The existing imx335_parse_hw_config function has two paths that can be taken without reporting to the user the reason for failing to accept the hardware configuration. Extend the error reporting paths to identify failures when probing the device. Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/i2c/imx335.c')
-rw-r--r--drivers/media/i2c/imx335.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c
index af5262aa0a50..26aaa5048a8b 100644
--- a/drivers/media/i2c/imx335.c
+++ b/drivers/media/i2c/imx335.c
@@ -795,8 +795,10 @@ static int imx335_parse_hw_config(struct imx335 *imx335)
}
ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
- if (!ep)
+ if (!ep) {
+ dev_err(imx335->dev, "Failed to get next endpoint\n");
return -ENXIO;
+ }
ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
fwnode_handle_put(ep);
@@ -821,6 +823,8 @@ static int imx335_parse_hw_config(struct imx335 *imx335)
if (bus_cfg.link_frequencies[i] == IMX335_LINK_FREQ)
goto done_endpoint_free;
+ dev_err(imx335->dev, "no compatible link frequencies found\n");
+
ret = -EINVAL;
done_endpoint_free: