From: Hans de Goede <hansg@kernel.org>
To: chitranshmandhaniya@gmail.com, ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, Chitransh_Mandhaniya@dell.com
Subject: Re: [PATCH] platform/x86: dell-uart-backlight: switch to devm_mutex_init()
Date: Mon, 26 Oct 2026 12:50:16 +0100 [thread overview]
Message-ID: <5c0d3a58-6dce-4fbb-b2b3-07f3b3d4a094@kernel.org> (raw)
In-Reply-To: <20261026042310.596206-1-chitranshmandhaniya@gmail.com>
Hi,
On 26-Oct-26 5:23 AM, chitranshmandhaniya@gmail.com wrote:
> From: Chitransh Mandhaniya <Chitransh_Mandhaniya@dell.com>
>
> Replace mutex_init() with devm_mutex_init() so that the mutex is
> automatically destroyed on driver removal via devres. The driver was
> missing a mutex_destroy() call on the teardown path.
>
> Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> Signed-off-by: Chitransh Mandhaniya <Chitransh_Mandhaniya@dell.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Regards,
Hans
> ---
> drivers/platform/x86/dell/dell-uart-backlight.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/dell/dell-uart-backlight.c b/drivers/platform/x86/dell/dell-uart-backlight.c
> index f323a667dc2d..2ed2f00d8c49 100644
> --- a/drivers/platform/x86/dell/dell-uart-backlight.c
> +++ b/drivers/platform/x86/dell/dell-uart-backlight.c
> @@ -279,7 +279,9 @@ static int dell_uart_bl_serdev_probe(struct serdev_device *serdev)
> if (!dell_bl)
> return -ENOMEM;
>
> - mutex_init(&dell_bl->mutex);
> + ret = devm_mutex_init(dev, &dell_bl->mutex);
> + if (ret)
> + return ret;
> init_waitqueue_head(&dell_bl->wait_queue);
> dell_bl->dev = dev;
>
prev parent reply other threads:[~2026-10-26 11:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 4:23 chitranshmandhaniya
2026-10-26 11:50 ` Hans de Goede [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=5c0d3a58-6dce-4fbb-b2b3-07f3b3d4a094@kernel.org \
--to=hansg@kernel.org \
--cc=Chitransh_Mandhaniya@dell.com \
--cc=chitranshmandhaniya@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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
all inboxes | Powered by JetHome®