[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220112110554.1862-1-linmq006@gmail.com>
Date: Wed, 12 Jan 2022 11:05:54 +0000
From: Miaoqian Lin <linmq006@...il.com>
To: hverkuil@...all.nl
Cc: hans.verkuil@...co.com, linmq006@...il.com,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
m.tretter@...gutronix.de, mchehab@...nel.org,
p.zabel@...gutronix.de
Subject: [PATCH v2] media: coda: Fix missing put_device() call in coda_get_vdoa_data
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@...il.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
Powered by blists - more mailing lists