diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2024-04-29 00:49:35 +0000 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2024-06-03 17:35:24 +0530 |
commit | e2d8ea0a066a6db51f31efd2710057271d685d2e (patch) | |
tree | dd20651707452274d1ad52623c35ac69df4cb468 /drivers/soundwire/amd_manager.c | |
parent | 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff) |
soundwire: fix usages 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 leaked references.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20240429004935.2400191-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/amd_manager.c')
-rw-r--r-- | drivers/soundwire/amd_manager.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c index 20d94bcfc9b4..795e223f7e5c 100644 --- a/drivers/soundwire/amd_manager.c +++ b/drivers/soundwire/amd_manager.c @@ -571,6 +571,9 @@ static int sdw_master_read_amd_prop(struct sdw_bus *bus) amd_manager->wake_en_mask = wake_en_mask; fwnode_property_read_u32(link, "amd-sdw-power-mode", &power_mode_mask); amd_manager->power_mode_mask = power_mode_mask; + + fwnode_handle_put(link); + return 0; } |