Skip to contentSkip to conversation

platform/chrome: cros_ec_typec: Add missing fwnode_handle_put()

PATCH Guenter Roeck 3 participants 3 messages Mar 26, 2023 – Apr 12, 2023 1 message not in the archive ChromeOS EC subdrivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Guenter Roeck

author Reviewed-by
#1 lore raw
Quoted 7 lines · Liang He

In cros_typec_init_ports(), 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 fdc6b21e2444 ("platform/chrome: Add Type C connector class driver")
Quoted 19 lines
---
 drivers/platform/chrome/cros_ec_typec.c | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/chrome/cros_ec_typec.c +1 -1
index 2a7ff14dc37e..3a242effc85d 100644
@@ -443,6 +443,7 @@ static int cros_typec_init_ports(struct cros_typec_data *typec)
        return 0;
 
 unregister_ports:
+       fwnode_handle_put(fwnode);
        cros_unregister_ports(typec);
        return ret;
 }
--

2.25.1

#2 lore raw
In reply to a message not in the archive

Hi Liang He,

Can you please resend this patch? I don't see it in patchwork or the mailing list any more.

Thanks!

Quoted 26 lines · Liang He

In cros_typec_init_ports(), 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 fdc6b21e2444 ("platform/chrome: Add Type C connector class driver")
---
 drivers/platform/chrome/cros_ec_typec.c | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/chrome/cros_ec_typec.c +1 -1
index 2a7ff14dc37e..3a242effc85d 100644
@@ -443,6 +443,7 @@ static int cros_typec_init_ports(struct cros_typec_data *typec)
        return 0;
 
 unregister_ports:
+       fwnode_handle_put(fwnode);
        cros_unregister_ports(typec);
        return ret;
 }
--

2.25.1

#3 lore raw
Quoted 7 lines · Prashant Malani

Hi Liang He,

Can you please resend this patch? I don't see it in patchwork or the mailing list any more.

Thanks!

I will resend now, thanks for your work on my patch.

Liang

Quoted 27 lines · Liang He
Quoted 26 lines

In cros_typec_init_ports(), 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 fdc6b21e2444 ("platform/chrome: Add Type C connector class driver")
---
 drivers/platform/chrome/cros_ec_typec.c | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/chrome/cros_ec_typec.c +1 -1
index 2a7ff14dc37e..3a242effc85d 100644
@@ -443,6 +443,7 @@ static int cros_typec_init_ports(struct cros_typec_data *typec)
        return 0;
 
 unregister_ports:
+       fwnode_handle_put(fwnode);
        cros_unregister_ports(typec);
        return ret;
 }
--

2.25.1