Skip to content

Commit 0b92ab6

Browse files
committed
drm/tegra: Fix NULL vs IS_ERR() check in probe()
JIRA: https://issues.redhat.com/browse/RHEL-78704 Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git commit a85df8c Author: Dan Carpenter <[email protected]> Date: Fri Sep 13 17:34:54 2024 +0300 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] (cherry picked from commit a85df8c) Signed-off-by: Jerry Snitselaar <[email protected]>
1 parent 9e964dd commit 0b92ab6

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
@@ -1152,8 +1152,8 @@ static int host1x_drm_probe(struct host1x_device *dev)
11521152

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

0 commit comments

Comments
 (0)