Skip to content

Commit a85df8c

Browse files
Dan Carpenterthierryreding
authored andcommitted
drm/tegra: Fix NULL vs IS_ERR() check in probe()
The iommu_paging_domain_alloc() function doesn't return NULL pointers, it returns error pointers. Update the check to match. Fixes: 45c690a ("drm/tegra: Use iommu_paging_domain_alloc()") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Lu Baolu <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 5c23878 commit a85df8c

File tree

1 file changed

+2
-2
lines changed
  • drivers/gpu/drm/tegra

1 file changed

+2
-2
lines changed

drivers/gpu/drm/tegra/drm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,8 +1153,8 @@ static int host1x_drm_probe(struct host1x_device *dev)
11531153

11541154
if (host1x_drm_wants_iommu(dev) && device_iommu_mapped(dma_dev)) {
11551155
tegra->domain = iommu_paging_domain_alloc(dma_dev);
1156-
if (!tegra->domain) {
1157-
err = -ENOMEM;
1156+
if (IS_ERR(tegra->domain)) {
1157+
err = PTR_ERR(tegra->domain);
11581158
goto free;
11591159
}
11601160

0 commit comments

Comments
 (0)