Skip to content
Commit 8d1b7809 authored by Inki Dae's avatar Inki Dae
Browse files

drm/exynos: fix a wrong error checking

Fix a wrong error checking in exynos_drm_dma.c module.

In the exynos_drm_register_dma function, both arm_iommu_create_mapping()
and iommu_get_domain_for_dev() functions are expected to return NULL as
an error.

However, the error checking is performed using the statement
if(IS_ERR(mapping)), which doesn't provide a suitable error value.
So check if 'mapping' is NULL, and if it is, return -ENODEV.

This issue[1] was reported by Dan.

Changelog v1:
- fix build warning.

[1] https://lore.kernel.org/all/33e52277-1349-472b-a55b-ab5c3462bfcf@moroto.mountain/



Reported-by : Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 73bf1c9a
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