From: "Nuno Sá" <noname.nuno@gmail.com>
To: Ma Ke <make24@iscas.ac.cn>,
jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
andy@kernel.org
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org
Subject: Re: [PATCH v4 1/2] iio: trigger: add missing mutex_destroy in iio_trig_release
Date: Mon, 10 Nov 2025 14:50:22 +0000 [thread overview]
Message-ID: <c8e0ea2d1859042bdc19a635718572f0e91d9889.camel@gmail.com> (raw)
In-Reply-To: <20251110035701.36691-1-make24@iscas.ac.cn>
On Mon, 2025-11-10 at 11:57 +0800, Ma Ke wrote:
> Add missing mutex_destroy() call in iio_trig_release() to properly
> clean up the mutex initialized in viio_trigger_alloc(). Ensure proper
> resource cleanup and follows kernel practices.
>
> Found by code review.
>
> Signed-off-by: Ma Ke <make24@iscas.ac.cn>
> ---
> Changes in v4:
> - split the patch into two independent patches and modified according to developer's suggestions;
> Changes in v3:
> - modified the patch;
> Changes in v2:
> - modified the patch, thanks for developer's suggestions.
> ---
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> drivers/iio/industrialio-trigger.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
> index 54416a384232..5baa83349e8f 100644
> --- a/drivers/iio/industrialio-trigger.c
> +++ b/drivers/iio/industrialio-trigger.c
> @@ -524,6 +524,7 @@ static void iio_trig_release(struct device *device)
> CONFIG_IIO_CONSUMERS_PER_TRIGGER);
> }
> kfree(trig->name);
> + mutex_destroy(&trig->pool_lock);
> kfree(trig);
> }
>
prev parent reply other threads:[~2025-11-10 14:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 3:57 [PATCH v4 1/2] iio: trigger: add missing mutex_destroy in iio_trig_release Ma Ke
2025-11-10 5:26 ` Andy Shevchenko
2025-11-10 14:50 ` Nuno Sá [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=c8e0ea2d1859042bdc19a635718572f0e91d9889.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=make24@iscas.ac.cn \
--cc=nuno.sa@analog.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).