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: <8ff02d0c947fe2a0635ea85dff732bc9@mail.gmail.com>
Date: Wed, 28 Aug 2024 12:07:54 -0700
From: William Zhang <william.zhang@...adcom.com>
To: Jinjie Ruan <ruanjinjie@...wei.com>, Kursad Oney <kursad.oney@...adcom.com>, 
	jonas.gorski@...il.com, bcm-kernel-feedback-list@...adcom.com, 
	broonie@...nel.org, Anand Gore <anand.gore@...adcom.com>, 
	Florian Fainelli <florian.fainelli@...adcom.com>, rafal@...ecki.pl, linux-spi@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: RE: [PATCH -next 1/2] spi: bcmbca-hsspi: Fix missing pm_runtime_disable()

Hi Jinjie,

> -----Original Message-----
> From: Jinjie Ruan <ruanjinjie@...wei.com>
> Sent: Monday, August 26, 2024 5:49 AM
> To: william.zhang@...adcom.com; kursad.oney@...adcom.com;
> jonas.gorski@...il.com; bcm-kernel-feedback-list@...adcom.com;
> broonie@...nel.org; anand.gore@...adcom.com;
> florian.fainelli@...adcom.com; rafal@...ecki.pl;
linux-spi@...r.kernel.org;
> linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org
> Cc: ruanjinjie@...wei.com
> Subject: [PATCH -next 1/2] spi: bcmbca-hsspi: Fix missing
> pm_runtime_disable()
>
> The pm_runtime_disable() is missing in remove function, use
> devm_pm_runtime_enable() to fix it. So the pm_runtime_disable() in
> the probe error path can also be removed.
>
> Fixes: a38a2233f23b ("spi: bcmbca-hsspi: Add driver for newer HSSPI
> controller")
> Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
> ---
>  drivers/spi/spi-bcmbca-hsspi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/spi/spi-bcmbca-hsspi.c
b/drivers/spi/spi-bcmbca-hsspi.c
> index e48a56c68ce7..f465daa473d0 100644
> --- a/drivers/spi/spi-bcmbca-hsspi.c
> +++ b/drivers/spi/spi-bcmbca-hsspi.c
> @@ -539,12 +539,14 @@ static int bcmbca_hsspi_probe(struct
> platform_device *pdev)
>  			goto out_put_host;
>  	}
>
> -	pm_runtime_enable(&pdev->dev);
> +	ret = devm_pm_runtime_enable(&pdev->dev);
> +	if (ret)
> +		goto out_put_host;
>
>  	ret = sysfs_create_group(&pdev->dev.kobj, &bcmbca_hsspi_group);
>  	if (ret) {
>  		dev_err(&pdev->dev, "couldn't register sysfs group\n");
> -		goto out_pm_disable;
> +		goto out_put_host;
>  	}
>
>  	/* register and we are done */
> @@ -558,8 +560,6 @@ static int bcmbca_hsspi_probe(struct
> platform_device *pdev)
>
>  out_sysgroup_disable:
>  	sysfs_remove_group(&pdev->dev.kobj, &bcmbca_hsspi_group);
> -out_pm_disable:
> -	pm_runtime_disable(&pdev->dev);
>  out_put_host:
>  	spi_controller_put(host);
>  out_disable_pll_clk:
> --
> 2.34.1

Reviewed-by: William Zhang <william.zhang@...adcom.com>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4212 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ