From: Takashi Iwai <tiwai@suse.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: linux-sound@vger.kernel.org, alsa-devel@alsa-project.org,
broonie@kernel.org
Subject: Re: [PATCH] ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node()
Date: Mon, 29 Apr 2024 17:01:52 +0200 [thread overview]
Message-ID: <874jbkp5zz.wl-tiwai@suse.de> (raw)
In-Reply-To: <20240426152731.38420-1-pierre-louis.bossart@linux.intel.com>
On Fri, 26 Apr 2024 17:27:31 +0200,
Pierre-Louis Bossart wrote:
>
> The documentation for device_get_named_child_node() mentions this
> important point:
>
> "
> The caller is responsible for calling fwnode_handle_put() on the
> returned fwnode pointer.
> "
>
> Add fwnode_handle_put() to avoid a leaked reference.
>
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Can we have a corresponding Fixes tag?
thanks,
Takashi
> ---
> sound/hda/intel-sdw-acpi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/sound/hda/intel-sdw-acpi.c b/sound/hda/intel-sdw-acpi.c
> index 5f60658c6051..d7417a40392b 100644
> --- a/sound/hda/intel-sdw-acpi.c
> +++ b/sound/hda/intel-sdw-acpi.c
> @@ -45,6 +45,8 @@ static bool is_link_enabled(struct fwnode_handle *fw_node, u8 idx)
> "intel-quirk-mask",
> &quirk_mask);
>
> + fwnode_handle_put(link);
> +
> if (quirk_mask & SDW_INTEL_QUIRK_MASK_BUS_DISABLE)
> return false;
>
> --
> 2.40.1
>
next prev parent reply other threads:[~2024-04-29 15:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 15:27 [PATCH] ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node() Pierre-Louis Bossart
2024-04-29 15:01 ` Takashi Iwai [this message]
2024-04-29 15:15 ` Pierre-Louis Bossart
2024-04-29 15:32 ` Takashi Iwai
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=874jbkp5zz.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.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