drm/nouveau/platform: checking for IS_ERR() instead of NULL
Subsystems (4)
PATCH 1/1 drm/nouveau/platform: checking for IS_ERR() instead of NULL
iommu_domain_alloc() returns NULL on error, it doesn't return error pointers.
Fixes 58fd9375c2c5 ('drm/nouveau/platform: probe IOMMU if present')
Signed-off-by Dan Carpenter <[email protected]>
drivers/gpu/drm/nouveau/nouveau_platform.c +1 -1
@@ -102,7 +102,7 @@ static void nouveau_platform_probe_iommu(struct device *dev,if (iommu_present (&platform_bus_type)) { gpu->iommu.domain =iommu_domain_alloc (&platform_bus_type); -if (IS_ERR (gpu->iommu.domain)) +if (!gpu->iommu.domain) goto error;/*
Quoted 5 lines · Dan Carpenter
iommu_domain_alloc()returns NULL on error, it doesn't return error pointers.Fixes 58fd9375c2c5 ('drm/nouveau/platform: probe IOMMU if present')Signed-off-by Dan Carpenter <[email protected]>
Indeed:
Reviewed-by Thierry Reding <[email protected]>
Quoted 2 lines · Dan Carpenter
iommu_domain_alloc()returns NULL on error, it doesn't return error pointers.
Oops, that's right.
Reviewed-by Alexandre Courbot <[email protected]>