diff mbox series

platform/chrome: cros_typec_switch: Add missing fwnode_handle_put()

Message ID 20230322041657.1857001-1-windhl@126.com (mailing list archive)
State Accepted
Commit d946c9118047e4338567a98c1b2400859abfbafc
Headers show
Series platform/chrome: cros_typec_switch: Add missing fwnode_handle_put() | expand

Commit Message

Liang He March 22, 2023, 4:16 a.m. UTC
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")
Signed-off-by: Liang He <windhl@126.com>
---
 drivers/platform/chrome/cros_typec_switch.c | 1 +
 1 file changed, 1 insertion(+)

Comments

patchwork-bot+chrome-platform@kernel.org April 7, 2023, 6:50 p.m. UTC | #1
Hello:

This patch was applied to chrome-platform/linux.git (for-kernelci)
by Prashant Malani <pmalani@chromium.org>:

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")
> Signed-off-by: Liang He <windhl@126.com>
> 
> [...]

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!
patchwork-bot+chrome-platform@kernel.org April 10, 2023, 8:30 p.m. UTC | #2
Hello:

This patch was applied to chrome-platform/linux.git (for-next)
by Prashant Malani <pmalani@chromium.org>:

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")
> Signed-off-by: Liang He <windhl@126.com>
> 
> [...]

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!
diff mbox series

Patch

diff --git a/drivers/platform/chrome/cros_typec_switch.c b/drivers/platform/chrome/cros_typec_switch.c
index a26219e97c93..26af51952f7f 100644
--- a/drivers/platform/chrome/cros_typec_switch.c
+++ b/drivers/platform/chrome/cros_typec_switch.c
@@ -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;
 }