From: Matteo Martelli <matteomartelli3@gmail.com>
To: victor.duicu@microchip.com, andy.shevchenko@gmail.com,
jic23@kernel.org, lars@metafoo.de
Cc: marius.cristea@microchip.com, victor.duicu@microchip.com,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: adc: pac1921: Move ACPI_FREE to cover all branches
Date: Thu, 16 Jan 2025 22:51:20 +0100 [thread overview]
Message-ID: <56d3d1f45c08064d13af42f6e67bddad@gmail.com> (raw)
In-Reply-To: <20250115130347.10777-1-victor.duicu@microchip.com>
On Wed, 15 Jan 2025 15:03:47 +0200, <victor.duicu@microchip.com> wrote:
> From: Victor Duicu <victor.duicu@microchip.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@gmail.com>
> Fixes: 9fdf1d033316 ("iio: adc: pac1921: Add ACPI support to Microchip pac1921")
> Signed-off-by: Victor Duicu <victor.duicu@microchip.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@gmail.com>
Best regards,
Matteo Martelli
prev parent reply other threads:[~2025-01-16 21:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 13:03 [PATCH v2] iio: adc: pac1921: Move ACPI_FREE to cover all branches victor.duicu
2025-01-16 21:51 ` Matteo Martelli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56d3d1f45c08064d13af42f6e67bddad@gmail.com \
--to=matteomartelli3@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marius.cristea@microchip.com \
--cc=victor.duicu@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.