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@wanadoo.fr>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
这个提交包含在:
Christophe JAILLET
2016-10-31 07:35:50 +01:00
提交者 Ben Skeggs
父节点 770b06e8cb
当前提交 91cf301f6f

查看文件

@@ -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;
/*