Skip to contentSkip to conversation

iio: dac: ad5755: Add missing fwnode_handle_put()

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

Subsystems (2)
lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 iio: dac: ad5755: Add missing fwnode_handle_put()

In ad5755_parse_fw(), 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 3ac27afefd5d ("iio:dac:ad5755: Switch to generic firmware properties and drop pdata")
---
 drivers/iio/dac/ad5755.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/dac/ad5755.c +1 -0
index beadfa938d2d..404865e35460 100644
@@ -802,6 +802,7 @@ static struct ad5755_platform_data *ad5755_parse_fw(struct device *dev)
 	return pdata;
 
  error_out:
+	fwnode_handle_put(pp);
 	devm_kfree(dev, pdata);
 	return NULL;
 }
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 6 lines · On Wed, 22 Mar 2023 11:56:27 +0800 Liang He <[email protected]> wrote:

In ad5755_parse_fw(), 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 3ac27afefd5d ("iio:dac:ad5755: Switch to generic firmware properties and drop pdata")

Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan

Quoted 16 lines
---
 drivers/iio/dac/ad5755.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/dac/ad5755.c +1 -0
index beadfa938d2d..404865e35460 100644
@@ -802,6 +802,7 @@ static struct ad5755_platform_data *ad5755_parse_fw(struct device *dev)
 	return pdata;
 
  error_out:
+	fwnode_handle_put(pp);
 	devm_kfree(dev, pdata);
 	return NULL;
 }