diff options
| author | Wentao Liang <vulab@iscas.ac.cn> | 2026-09-17 10:07:21 +0000 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-10-04 17:32:42 +0200 |
| commit | ff3308afa9c9da0ef9113cb80803588adabef902 (patch) | |
| tree | 8ead732d4cfb2d8674d6c33cf45ed4ecfa65da49 /rust/kernel/alloc | |
| parent | fed2e02a1210c42ec5a0b61c6f2cb17e9a2ae632 (diff) | |
media: platform: mtk-mdp3: Fix device reference leak in mdp_comp_init()
mdp_comp_init() takes a reference to the component platform device
with of_find_device_by_node(), but the error path taken when the
clock array cannot be allocated and the one taken for a component
without a GCE EOF event return without dropping it. The caller
frees the mdp_comp in those cases, so the reference is leaked.
Release the reference on both error paths.
Fixes: c4320f9721fd ("media: platform: mtk-mdp3: dynamically allocate component clocks")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions
