]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
media: rkvdec: Fix a NULL vs IS_ERR() bug in probe()
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 11 Aug 2025 14:18:07 +0000 (10:18 -0400)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 18 Aug 2025 07:55:04 +0000 (09:55 +0200)
commit6347dc7fb967521a77f9ff0774d25ef0cca4c6cd
treebd434084e2476e8c8f89cdb6b66fe5b237709394
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
media: rkvdec: Fix a NULL vs IS_ERR() bug in probe()

The iommu_paging_domain_alloc() function doesn't return NULL on error it
returns error pointers.  Update the check and then set ->empty_domain to
NULL because the rest of the driver assumes it can be NULL.

Fixes: ff8c5622f9f7 ("media: rkvdec: Restore iommu addresses on errors")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Tested-by: Detlev Casanova <detlev.casanova@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