From: Prabhav Kumar Vaish <pvkumar5749404@gmail.com>
To: nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
claudiu.beznea@tuxon.dev
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, julia.lawall@inria.fr,
javier.carrasco@wolfvision.net, skhan@linuxfoundation.org,
Prabhav Kumar Vaish <pvkumar5749404@gmail.com>
Subject: [PATCH] drivers: soc: atmel: Automated Cleanup using __free()
Date: Tue, 21 May 2024 23:08:57 +0530 [thread overview]
Message-ID: <20240521173857.1080030-1-pvkumar5749404@gmail.com> (raw)
Using automated cleanup to replace of_node_put() handling
allows for a simplified flow to enable direct returns on errors.
Signed-off-by: Prabhav Kumar Vaish <pvkumar5749404@gmail.com>
---
drivers/soc/atmel/soc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/soc/atmel/soc.c b/drivers/soc/atmel/soc.c
index cc9a3e107479..8c7fe37b4f21 100644
--- a/drivers/soc/atmel/soc.c
+++ b/drivers/soc/atmel/soc.c
@@ -250,7 +250,7 @@ static const struct at91_soc socs[] __initconst = {
static int __init at91_get_cidr_exid_from_dbgu(u32 *cidr, u32 *exid)
{
- struct device_node *np;
+ struct device_node *np __free(device_node);
void __iomem *regs;
np = of_find_compatible_node(NULL, NULL, "atmel,at91rm9200-dbgu");
@@ -261,7 +261,6 @@ static int __init at91_get_cidr_exid_from_dbgu(u32 *cidr, u32 *exid)
return -ENODEV;
regs = of_iomap(np, 0);
- of_node_put(np);
if (!regs) {
pr_warn("Could not map DBGU iomem range");
--
2.34.1
reply other threads:[~2024-05-21 17:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240521173857.1080030-1-pvkumar5749404@gmail.com \
--to=pvkumar5749404@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=javier.carrasco@wolfvision.net \
--cc=julia.lawall@inria.fr \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=skhan@linuxfoundation.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
all inboxes | Powered by JetHome®