]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: rkvdec: Fix an error handling path in rkvdec_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 30 Jul 2025 18:24:44 +0000 (20:24 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 18 Aug 2025 07:55:05 +0000 (09:55 +0200)
commit0d58a72b66ec4c24128395e408348c2c84221605
treea41b3a8a9d02734d64e23ed8c96eb8b080909f1f
parent6347dc7fb967521a77f9ff0774d25ef0cca4c6cd
media: rkvdec: Fix an error handling path in rkvdec_probe()

If an error occurs after a successful iommu_paging_domain_alloc() call, it
should be undone by a corresponding iommu_domain_free() call, as already
done in the remove function.

In order to fix the issue, move the corresponding call at the end of the
function, because it is safe to allocate 'empty_domain' later.

Fixes: ff8c5622f9f7 ("media: rkvdec: Restore iommu addresses on errors")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
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>
drivers/media/platform/rockchip/rkvdec/rkvdec.c