diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-12-04 14:00:35 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2015-01-27 12:14:36 +0300 |
commit | bf19b885f956eb0fec7dd7c02400b679dca7312e (patch) | |
tree | f36b19cbb5cb340e6c6fb1c6e8a5a26b12e9e8af /drivers/gpu/drm/tegra/drm.c | |
parent | 518e6227afe076a7facd9a9b5ce1d5ded98732d5 (diff) | |
download | linux-bf19b885f956eb0fec7dd7c02400b679dca7312e.tar.xz |
drm/tegra: Check for NULL pointer instead of IS_ERR()
iommu_domain_alloc() returns NULL on error, it never returns error
pointers.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/drm.c')
-rw-r--r-- | drivers/gpu/drm/tegra/drm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index a0c18ae79029..219f314cc162 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -36,8 +36,8 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags) if (iommu_present(&platform_bus_type)) { tegra->domain = iommu_domain_alloc(&platform_bus_type); - if (IS_ERR(tegra->domain)) { - err = PTR_ERR(tegra->domain); + if (!tegra->domain) { + err = -ENOMEM; goto free; } |