Commit 91cf301f authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Ben Skeggs

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 770b06e8
......@@ -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;
/*
......
Markdown is supported
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