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, julia.lawall@inria.fr
Subject: [PATCH] gpu: ipu-v3: Removal of of_node_put with __free for auto cleanup
Date: Tue, 2 Jul 2024 15:01:09 +0000 [thread overview]
Message-ID: <20240702150109.1002065-1-jain.abhinav177@gmail.com> (raw)
Remove of_node_put for device node prg_node.
Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
---
drivers/gpu/ipu-v3/ipu-prg.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/ipu-v3/ipu-prg.c b/drivers/gpu/ipu-v3/ipu-prg.c
index 729605709955..d1f46bc761ec 100644
--- a/drivers/gpu/ipu-v3/ipu-prg.c
+++ b/drivers/gpu/ipu-v3/ipu-prg.c
@@ -84,8 +84,8 @@ static LIST_HEAD(ipu_prg_list);
struct ipu_prg *
ipu_prg_lookup_by_phandle(struct device *dev, const char *name, int ipu_id)
{
- struct device_node *prg_node = of_parse_phandle(dev->of_node,
- name, 0);
+ struct device_node *prg_node __free(device_node) =
+ of_parse_phandle(dev->of_node, name, 0);
struct ipu_prg *prg;
mutex_lock(&ipu_prg_list_mutex);
@@ -95,14 +95,11 @@ ipu_prg_lookup_by_phandle(struct device *dev, const char *name, int ipu_id)
device_link_add(dev, prg->dev,
DL_FLAG_AUTOREMOVE_CONSUMER);
prg->id = ipu_id;
- of_node_put(prg_node);
return prg;
}
}
mutex_unlock(&ipu_prg_list_mutex);
- of_node_put(prg_node);
-
return NULL;
}
--
2.34.1
next reply other threads:[~2024-07-02 15:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 15:01 Abhinav Jain [this message]
2024-07-02 15:29 ` Javier Carrasco
2024-07-04 13:26 ` Abhinav Jain
-- strict thread matches above, loose matches on Subject: below --
2024-07-02 14:48 Abhinav Jain
2024-07-02 15:08 ` Javier Carrasco
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=20240702150109.1002065-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=julia.lawall@inria.fr \
--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®