diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-01-12 14:05:54 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 15:40:05 +0300 |
commit | d3e5106c6768f20e38a076a779f59869bf8a7df0 (patch) | |
tree | 3d8c06282d7e067d2f50cbc451e7f4cfce1ba9ab | |
parent | c9f4586d9935eea511925ded48efef1b910887df (diff) | |
download | linux-d3e5106c6768f20e38a076a779f59869bf8a7df0.tar.xz |
media: coda: Fix missing put_device() call in coda_get_vdoa_data
[ Upstream commit ca85d271531a1e1c86f24b892f57b7d0a3ddb5a6 ]
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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 1eed69d29149..2333079a83c7 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); |