Re: [PATCH] ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>

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
> 



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux