Commit ca85d271 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Mauro Carvalho Chehab

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: e7f3c548 ("[media] coda: use VDOA for un-tiling custom macroblock format")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent f9e795ea
......@@ -409,6 +409,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment