lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f91f55a1-850c-4368-86ef-9fce7cc4ccf1@baylibre.com>
Date: Mon, 4 Nov 2024 09:30:41 +0100
From: Julien Panis <jpanis@...libre.com>
To: Jiasheng Jiang <jiashengjiangcool@...il.com>, vigneshr@...com,
 wbg@...nel.org, gregkh@...uxfoundation.org
Cc: linux-iio@...r.kernel.org, linux-omap@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] counter: ti-ecap-capture: Add check for clk_enable()

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@...il.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@...libre.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ