From: Abhinav Jain <jain.abhinav177@gmail.com>
To: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: skhan@linuxfoundation.org, javier.carrasco.cruz@gmail.com,
jain.abhinav177@gmail.com
Subject: [PATCH] gpu: ipu-v3: Removal of of_node_put with __free for auto cleanup
Date: Tue, 2 Jul 2024 14:48:36 +0000 [thread overview]
Message-ID: <20240702144836.1001916-1-jain.abhinav177@gmail.com> (raw)
Remove of_node_put from device node of_node.
Move declaration to initialization for ensuring scope sanity.
Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
---
drivers/gpu/ipu-v3/ipu-common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index 71ec1e7f657a..f8cc3f721d2a 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -1150,10 +1150,10 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
for (i = 0; i < ARRAY_SIZE(client_reg); i++) {
struct ipu_platform_reg *reg = &client_reg[i];
struct platform_device *pdev;
- struct device_node *of_node;
-
/* Associate subdevice with the corresponding port node */
- of_node = of_graph_get_port_by_id(dev->of_node, i);
+ struct device_node *of_node __free(device_node) =
+ of_graph_get_port_by_id(dev->of_node, i);
+
if (!of_node) {
dev_info(dev,
"no port@%d node in %pOF, not using %s%d\n",
--
2.34.1
next reply other threads:[~2024-07-02 14:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 14:48 Abhinav Jain [this message]
2024-07-02 15:08 ` Javier Carrasco
2024-07-02 15:01 Abhinav Jain
2024-07-02 15:29 ` Javier Carrasco
2024-07-04 13:26 ` Abhinav Jain
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=20240702144836.1001916-1-jain.abhinav177@gmail.com \
--to=jain.abhinav177@gmail.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=javier.carrasco.cruz@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--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®