summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2024-04-26 10:27:31 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-17 11:56:00 +0200
commit722d33c442e66e4aabd3e778958d696ff3a2777e (patch)
treed7e846782a9fab6be6ba6ec15298689602d3192a /sound
parent21d458ecf443a3873d2f50ca38bb7ba30ad8be2e (diff)
downloadlinux-722d33c442e66e4aabd3e778958d696ff3a2777e.tar.gz
linux-722d33c442e66e4aabd3e778958d696ff3a2777e.tar.bz2
linux-722d33c442e66e4aabd3e778958d696ff3a2777e.zip
ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node()
[ Upstream commit c158cf914713efc3bcdc25680c7156c48c12ef6a ] 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> Fixes: 08c2a4bc9f2a ("ALSA: hda: move Intel SoundWire ACPI scan to dedicated module") Message-ID: <20240426152731.38420-1-pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/hda/intel-sdw-acpi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/hda/intel-sdw-acpi.c b/sound/hda/intel-sdw-acpi.c
index b57d72ea4503..4e376994bf78 100644
--- a/sound/hda/intel-sdw-acpi.c
+++ b/sound/hda/intel-sdw-acpi.c
@@ -41,6 +41,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;