Christophe JAILLET
2016-Oct-31 06:35 UTC
[Nouveau] [PATCH] drm/nouveau/tegra: Fix error handling
'iommu_domain_alloc()' returns NULL in case of error, not an error pointer. So test it accordingly. Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr> --- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index 9b638bd905ff..f2bc0b7d9b93 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -102,7 +102,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev) if (iommu_present(&platform_bus_type)) { tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type); - if (IS_ERR(tdev->iommu.domain)) + if (!tdev->iommu.domain) goto error; /* -- 2.9.3
Alexandre Courbot
2016-Nov-02 04:59 UTC
[Nouveau] [PATCH] drm/nouveau/tegra: Fix error handling
On Mon, Oct 31, 2016 at 3:35 PM, Christophe JAILLET <christophe.jaillet at wanadoo.fr> wrote:> 'iommu_domain_alloc()' returns NULL in case of error, not an error pointer. > So test it accordingly. > > Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>Reviewed-by: Alexandre Courbot <acourbot at nvidia.com> Indeed. Thanks for the fix!
Seemingly Similar Threads
- [PATCH] drm/nouveau/tegra: Modify error handling
- [PATCH 1/3] drm/nouveau/tegra: Use iommu_paging_domain_alloc()
- [PATCH -next] drm/nouveau/device: fix return value check in nvkm_device_tegra_probe_iommu()
- [PATCH v2 1/3] drm/nouveau/tegra: Use iommu_paging_domain_alloc()
- [PATCH v2 1/3] drm/nouveau/tegra: Use iommu_paging_domain_alloc()