Skip to content
Snippets Groups Projects
Commit 1af87779 authored by Kieran Bingham's avatar Kieran Bingham Committed by Hans Verkuil
Browse files

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: default avatarUmang Jain <umang.jain@ideasonboard.com>
Signed-off-by: default avatarKieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent d5ca45b8
No related branches found
No related tags found
No related merge requests found
...@@ -795,8 +795,10 @@ static int imx335_parse_hw_config(struct imx335 *imx335) ...@@ -795,8 +795,10 @@ static int imx335_parse_hw_config(struct imx335 *imx335)
} }
ep = fwnode_graph_get_next_endpoint(fwnode, NULL); ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
if (!ep) if (!ep) {
dev_err(imx335->dev, "Failed to get next endpoint\n");
return -ENXIO; return -ENXIO;
}
ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg); ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
fwnode_handle_put(ep); fwnode_handle_put(ep);
...@@ -821,6 +823,8 @@ static int imx335_parse_hw_config(struct imx335 *imx335) ...@@ -821,6 +823,8 @@ static int imx335_parse_hw_config(struct imx335 *imx335)
if (bus_cfg.link_frequencies[i] == IMX335_LINK_FREQ) if (bus_cfg.link_frequencies[i] == IMX335_LINK_FREQ)
goto done_endpoint_free; goto done_endpoint_free;
dev_err(imx335->dev, "no compatible link frequencies found\n");
ret = -EINVAL; ret = -EINVAL;
done_endpoint_free: done_endpoint_free:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment