Skip to contentSkip to conversation

platform/chrome: cros_typec_switch: Add missing fwnode_handle_put()

PATCH Applied Liang He 2 participants 3 messages Mar 22, 2023 – Apr 10, 2023

Subsystems (3)
lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 platform/chrome: cros_typec_switch: Add missing fwnode_handle_put()

In cros_typec_register_switches(), we should add fwnode_handle_put() when break out of the iteration device_for_each_child_node() as it will automatically increase and decrease the refcounter.

Fixes affc804c44c8 ("platform/chrome: cros_typec_switch: Add switch driver")
---
 drivers/platform/chrome/cros_typec_switch.c | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/chrome/cros_typec_switch.c +1 -0
index a26219e97c93..26af51952f7f 100644
@@ -268,6 +268,7 @@ static int cros_typec_register_switches(struct cros_typec_switch_data *sdata)
 
 	return 0;
 err_switch:
+	fwnode_handle_put(fwnode);
 	cros_typec_unregister_switches(sdata);
 	return ret;
 }
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to chrome-platform/linux.git (for-kernelci) by Prashant Malani <[email protected]>:

Hello:

This patch was applied to chrome-platform/linux.git (for-kernelci) by Prashant Malani <[email protected]>:

Quoted 8 lines · On Wed, 22 Mar 2023 12:16:57 +0800 you wrote:

In cros_typec_register_switches(), we should add fwnode_handle_put() when break out of the iteration device_for_each_child_node() as it will automatically increase and decrease the refcounter.

Fixes affc804c44c8 ("platform/chrome: cros_typec_switch: Add switch driver")

[...]

Here is the summary with links:
- platform/chrome: cros_typec_switch: Add missing fwnode_handle_put()

    https://git.kernel.org/chrome-platform/c/d946c9118047

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
#2 lore raw
In reply to Liang He
This patch was applied to chrome-platform/linux.git (for-next) by Prashant Malani <[email protected]>:

Hello:

This patch was applied to chrome-platform/linux.git (for-next) by Prashant Malani <[email protected]>:

Quoted 8 lines · On Wed, 22 Mar 2023 12:16:57 +0800 you wrote:

In cros_typec_register_switches(), we should add fwnode_handle_put() when break out of the iteration device_for_each_child_node() as it will automatically increase and decrease the refcounter.

Fixes affc804c44c8 ("platform/chrome: cros_typec_switch: Add switch driver")

[...]

Here is the summary with links:
- platform/chrome: cros_typec_switch: Add missing fwnode_handle_put()

    https://git.kernel.org/chrome-platform/c/d946c9118047

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html