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] [day] [month] [year] [list]
Message-ID: <20240823131242.000070b2@Huawei.com>
Date: Fri, 23 Aug 2024 13:12:42 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Wu Bo <bo.wu@...o.com>
CC: <linux-kernel@...r.kernel.org>, Shawn Guo <shawnguo@...nel.org>, "Sascha
 Hauer" <s.hauer@...gutronix.de>, Pengutronix Kernel Team
	<kernel@...gutronix.de>, <imx@...ts.linux.dev>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 2/2] bus: imx-weim: change to use devm_clk_get_enabled()
 helpers

On Fri, 23 Aug 2024 04:22:11 -0600
Wu Bo <bo.wu@...o.com> wrote:

> Make the code cleaner and avoid call clk_disable_unprepare()
> 
> Signed-off-by: Wu Bo <bo.wu@...o.com>
> ---
>  drivers/bus/imx-weim.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
> index 837bf9d51c6e..81483461b514 100644
> --- a/drivers/bus/imx-weim.c
> +++ b/drivers/bus/imx-weim.c
> @@ -282,19 +282,13 @@ static int weim_probe(struct platform_device *pdev)
>  	dev_set_drvdata(&pdev->dev, priv);
>  
>  	/* get the clock */
> -	clk = devm_clk_get(&pdev->dev, NULL);
> +	clk = devm_clk_get_enabled(&pdev->dev, NULL);
>  	if (IS_ERR(clk))
>  		return PTR_ERR(clk);
>  
> -	ret = clk_prepare_enable(clk);
> -	if (ret)
> -		return ret;
> -
>  	/* parse the device node */
>  	ret = weim_parse_dt(pdev);
> -	if (ret)
	if (ret)
		return ret;

	dev_info()

	return 0;


> -		clk_disable_unprepare(clk);
> -	else
> +	if (!ret)
>  		dev_info(&pdev->dev, "Driver registered.\n");
>  
>  	return ret;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ