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: <56d3d1f45c08064d13af42f6e67bddad@gmail.com>
Date: Thu, 16 Jan 2025 22:51:20 +0100
From: Matteo Martelli <matteomartelli3@...il.com>
To: victor.duicu@...rochip.com, andy.shevchenko@...il.com, jic23@...nel.org,
	lars@...afoo.de
Cc: marius.cristea@...rochip.com, victor.duicu@...rochip.com,
	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] iio: adc: pac1921: Move ACPI_FREE to cover all
 branches

On Wed, 15 Jan 2025 15:03:47 +0200, <victor.duicu@...rochip.com> wrote:
> From: Victor Duicu <victor.duicu@...rochip.com>
> 
> This patch moves ACPI_FREE in pac1921_match_acpi_device
> in order to cover all branches.

Just a reminder that in v1, I think Andy suggested to edit the commit
message by adding parenthesis to the function name. I also find it more
clear.

> 
> Reported-by: Andy Shevchenko <andy.shevchenko@...il.com>
> Fixes: 9fdf1d033316 ("iio: adc: pac1921: Add ACPI support to Microchip pac1921")
> Signed-off-by: Victor Duicu <victor.duicu@...rochip.com>
> ---
> 
> This patch ensures that status is freed before
> exiting the function.
> 
> Differences related to previous versions:
> v2:
> - add Fixes tag.
> - remove unnecessary blank line.
> 
> v1:
> - initial version for review.
> 
>  drivers/iio/adc/pac1921.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/pac1921.c b/drivers/iio/adc/pac1921.c
> index 90f61c47b1c4..63f518215156 100644
> --- a/drivers/iio/adc/pac1921.c
> +++ b/drivers/iio/adc/pac1921.c
> @@ -1198,11 +1198,11 @@ static int pac1921_match_acpi_device(struct iio_dev *indio_dev)
>  
>  	label = devm_kstrdup(dev, status->package.elements[0].string.pointer,
>  			     GFP_KERNEL);
> +	ACPI_FREE(status);
>  	if (!label)
>  		return -ENOMEM;
>  
>  	indio_dev->label = label;
> -	ACPI_FREE(status);
>  
>  	return 0;
>  }
> 
> base-commit: 577a66e2e634f712384c57a98f504c44ea4b47da
> -- 
> 2.45.2
> 

LGTM.

Acked-by: Matteo Martelli <matteomartelli3@...il.com>

Best regards,
Matteo Martelli

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ