mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 06:08:22 +00:00
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>
This commit is contained in:
parent
518e6227af
commit
bf19b885f9
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue