All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Panis <jpanis@baylibre.com>
To: Jiasheng Jiang <jiashengjiangcool@gmail.com>,
	vigneshr@ti.com, wbg@kernel.org, gregkh@linuxfoundation.org
Cc: linux-iio@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] counter: ti-ecap-capture: Add check for clk_enable()
Date: Mon, 4 Nov 2024 09:30:41 +0100	[thread overview]
Message-ID: <f91f55a1-850c-4368-86ef-9fce7cc4ccf1@baylibre.com> (raw)
In-Reply-To: <20241103213910.31976-1-jiashengjiangcool@gmail.com>

On 11/3/24 22:39, Jiasheng Jiang wrote:
> Add check for the return value of clk_enable() in order to catch the
> potential exception.
>
> Fixes: 4e2f42aa00b6 ("counter: ti-ecap-capture: capture driver support for ECAP")
> Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
> ---
>   drivers/counter/ti-ecap-capture.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/counter/ti-ecap-capture.c b/drivers/counter/ti-ecap-capture.c
> index 675447315caf..30a269fa5da0 100644
> --- a/drivers/counter/ti-ecap-capture.c
> +++ b/drivers/counter/ti-ecap-capture.c
> @@ -574,8 +574,11 @@ static int ecap_cnt_resume(struct device *dev)
>   {
>   	struct counter_device *counter_dev = dev_get_drvdata(dev);
>   	struct ecap_cnt_dev *ecap_dev = counter_priv(counter_dev);
> +	int ret;
>   
> -	clk_enable(ecap_dev->clk);
> +	ret = clk_enable(ecap_dev->clk);
> +	if (ret)
> +		return ret;
>   
>   	ecap_cnt_capture_set_evmode(counter_dev, ecap_dev->pm_ctx.ev_mode);
>   

Reviewed-by: Julien Panis <jpanis@baylibre.com>


  reply	other threads:[~2024-11-04  8:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-03 21:39 [PATCH] counter: ti-ecap-capture: Add check for clk_enable() Jiasheng Jiang
2024-11-04  8:30 ` Julien Panis [this message]
2024-11-04 14:28 ` William Breathitt Gray
  -- strict thread matches above, loose matches on Subject: below --
2024-11-04 19:31 Jiasheng Jiang

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=f91f55a1-850c-4368-86ef-9fce7cc4ccf1@baylibre.com \
    --to=jpanis@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jiashengjiangcool@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=vigneshr@ti.com \
    --cc=wbg@kernel.org \
    /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.