Commit 2b393f91 authored by Fabio Estevam's avatar Fabio Estevam Committed by Mauro Carvalho Chehab

media: imx7-mipi-csis: Propagate the error if clock enabling fails

Currently the return value from clk_bulk_prepare_enable() is checked,
but it is not propagate it in the case of failure.

Fix it and also move the error message to the caller of
mipi_csis_clk_enable().
Signed-off-by: default avatarFabio Estevam <festevam@gmail.com>
Reviewed-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 3c1b9ac7
......@@ -456,13 +456,9 @@ static void mipi_csis_set_params(struct csi_state *state)
MIPI_CSIS_CMN_CTRL_UPDATE_SHADOW_CTRL);
}
static void mipi_csis_clk_enable(struct csi_state *state)
static int mipi_csis_clk_enable(struct csi_state *state)
{
int ret;
ret = clk_bulk_prepare_enable(state->num_clks, state->clks);
if (ret < 0)
dev_err(state->dev, "failed to enable clocks\n");
return clk_bulk_prepare_enable(state->num_clks, state->clks);
}
static void mipi_csis_clk_disable(struct csi_state *state)
......@@ -989,7 +985,11 @@ static int mipi_csis_probe(struct platform_device *pdev)
if (ret < 0)
return ret;
mipi_csis_clk_enable(state);
ret = mipi_csis_clk_enable(state);
if (ret < 0) {
dev_err(state->dev, "failed to enable clocks: %d\n", ret);
return ret;
}
ret = devm_request_irq(dev, state->irq, mipi_csis_irq_handler,
0, dev_name(dev), state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment