Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: dac: ad5755: Add missing fwnode_handle_put()
@ 2023-03-22  3:56 Liang He
  2023-04-01 15:42 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Liang He @ 2023-03-22  3:56 UTC (permalink / raw)
  To: lars, Michael.Hennerich, jic23, linux-iio, Jonathan.Cameron,
	windhl

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")
Signed-off-by: Liang He <windhl@126.com>
---
 drivers/iio/dac/ad5755.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
index beadfa938d2d..404865e35460 100644
--- a/drivers/iio/dac/ad5755.c
+++ b/drivers/iio/dac/ad5755.c
@@ -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;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-01 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-22  3:56 [PATCH] iio: dac: ad5755: Add missing fwnode_handle_put() Liang He
2023-04-01 15:42 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox