提交 bf19b885 编写于 作者: D Dan Carpenter 提交者: Thierry Reding

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 518e6227
...@@ -36,8 +36,8 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags) ...@@ -36,8 +36,8 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
if (iommu_present(&platform_bus_type)) { if (iommu_present(&platform_bus_type)) {
tegra->domain = iommu_domain_alloc(&platform_bus_type); tegra->domain = iommu_domain_alloc(&platform_bus_type);
if (IS_ERR(tegra->domain)) { if (!tegra->domain) {
err = PTR_ERR(tegra->domain); err = -ENOMEM;
goto free; goto free;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册