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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f6f15268-e2e4-4ee2-9e17-40785b9861c9@roeck-us.net>
Date: Fri, 28 Jun 2024 09:48:55 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Chen Ni <nichen@...as.ac.cn>, xingyu.wu@...rfivetech.com,
 samin.guo@...rfivetech.com, wim@...ux-watchdog.org
Cc: linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] watchdog: starfive: Add missing clk_disable_unprepare()

On 6/27/24 20:35, Chen Ni wrote:
> Add the missing clk_disable_unprepare() before return in
> starfive_wdt_enable_clock().
> 
> Signed-off-by: Chen Ni <nichen@...as.ac.cn>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>   drivers/watchdog/starfive-wdt.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/starfive-wdt.c b/drivers/watchdog/starfive-wdt.c
> index b4b059883618..19a2620d3d38 100644
> --- a/drivers/watchdog/starfive-wdt.c
> +++ b/drivers/watchdog/starfive-wdt.c
> @@ -152,8 +152,10 @@ static int starfive_wdt_enable_clock(struct starfive_wdt *wdt)
>   		return dev_err_probe(wdt->wdd.parent, ret, "failed to enable apb clock\n");
>   
>   	ret = clk_prepare_enable(wdt->core_clk);
> -	if (ret)
> +	if (ret) {
> +		clk_disable_unprepare(wdt->apb_clk);
>   		return dev_err_probe(wdt->wdd.parent, ret, "failed to enable core clock\n");
> +	}
>   
>   	return 0;
>   }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ