From: Miaoqian Lin <linmq006@gmail.com>
To: hverkuil@xs4all.nl
Cc: hans.verkuil@cisco.com, linmq006@gmail.com,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
m.tretter@pengutronix.de, mchehab@kernel.org,
p.zabel@pengutronix.de
Subject: [PATCH v2] media: coda: Fix missing put_device() call in coda_get_vdoa_data
Date: Wed, 12 Jan 2022 11:05:54 +0000 [thread overview]
Message-ID: <20220112110554.1862-1-linmq006@gmail.com> (raw)
In-Reply-To: <5454a150-7b11-dbce-02c4-d300c6629b1e@xs4all.nl>
The reference taken by 'of_find_device_by_node()' must be released when
not needed anymore.
Add the corresponding 'put_device()' in the error handling path.
Fixes: e7f3c5481035 ("[media] coda: use VDOA for un-tiling custom macroblock format")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
Changes in v2:
- remove the goto and unused label.
---
drivers/media/platform/coda/coda-common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 0e312b0842d7..c3942b0abb00 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -408,6 +408,7 @@ static struct vdoa_data *coda_get_vdoa_data(void)
if (!vdoa_data)
vdoa_data = ERR_PTR(-EPROBE_DEFER);
+ put_device(&vdoa_pdev->dev);
out:
of_node_put(vdoa_node);
--
2.17.1
prev parent reply other threads:[~2022-01-12 11:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 8:18 [PATCH] " Miaoqian Lin
2022-01-11 10:06 ` Hans Verkuil
2022-01-12 11:05 ` Miaoqian Lin [this message]
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=20220112110554.1862-1-linmq006@gmail.com \
--to=linmq006@gmail.com \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.tretter@pengutronix.de \
--cc=mchehab@kernel.org \
--cc=p.zabel@pengutronix.de \
/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
Powered by JetHome