Skip to content

Commit c158cf9

Browse files
plbossarttiwai
authored andcommitted
ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node()
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 <[email protected]> Fixes: 08c2a4b ("ALSA: hda: move Intel SoundWire ACPI scan to dedicated module") Message-ID: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 79ac4c1 commit c158cf9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/hda/intel-sdw-acpi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ static bool is_link_enabled(struct fwnode_handle *fw_node, u8 idx)
4545
"intel-quirk-mask",
4646
&quirk_mask);
4747

48+
fwnode_handle_put(link);
49+
4850
if (quirk_mask & SDW_INTEL_QUIRK_MASK_BUS_DISABLE)
4951
return false;
5052

0 commit comments

Comments
 (0)