From: Liang He <windhl@126.com>
To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
linux-iio@vger.kernel.org, Jonathan.Cameron@huawei.com,
windhl@126.com
Subject: [PATCH] iio: dac: ad5755: Add missing fwnode_handle_put()
Date: Wed, 22 Mar 2023 11:56:27 +0800 [thread overview]
Message-ID: <20230322035627.1856421-1-windhl@126.com> (raw)
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
next reply other threads:[~2023-03-22 4:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 3:56 Liang He [this message]
2023-04-01 15:42 ` [PATCH] iio: dac: ad5755: Add missing fwnode_handle_put() Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230322035627.1856421-1-windhl@126.com \
--to=windhl@126.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=Michael.Hennerich@analog.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox