All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rui Miguel Silva <rmfrfs@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: hverkuil-cisco@xs4all.nl, p.zabel@pengutronix.de,
	slongerbeam@gmail.com, linux-media@vger.kernel.org
Subject: Re: [PATCH 1/3] media: imx7-mipi-csis: Propagate the error if clock enabling fails
Date: Mon, 03 Jun 2019 18:46:47 +0100	[thread overview]
Message-ID: <m3lfyia7fg.fsf@gmail.com> (raw)
In-Reply-To: <20190531174506.13251-1-festevam@gmail.com>

Oi Fabio,
On Fri 31 May 2019 at 18:45, Fabio Estevam wrote:
> 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: Fabio Estevam <festevam@gmail.com>

Thanks for the 3 patches. for all of them:
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>

---
Cheers,
        Rui

> ---
>  drivers/staging/media/imx/imx7-mipi-csis.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
> index 042837b8ea28..1b538ae77364 100644
> --- a/drivers/staging/media/imx/imx7-mipi-csis.c
> +++ b/drivers/staging/media/imx/imx7-mipi-csis.c
> @@ -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);


      parent reply	other threads:[~2019-06-03 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 17:45 [PATCH 1/3] media: imx7-mipi-csis: Propagate the error if clock enabling fails Fabio Estevam
2019-05-31 17:45 ` [PATCH 2/3] media: imx7-mipi-csis: Remove unneeded 'ret' initialization Fabio Estevam
2019-05-31 17:45 ` [PATCH 3/3] media: imx7-mipi-csis: Remove extra blank line Fabio Estevam
2019-06-03 17:46 ` Rui Miguel Silva [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3lfyia7fg.fsf@gmail.com \
    --to=rmfrfs@gmail.com \
    --cc=festevam@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=slongerbeam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.