projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
518e622
)
drm/tegra: Check for NULL pointer instead of IS_ERR()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Thu, 4 Dec 2014 11:00:35 +0000
(14:00 +0300)
committer
Thierry Reding
<treding@nvidia.com>
Tue, 27 Jan 2015 09:14:36 +0000
(10:14 +0100)
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>
drivers/gpu/drm/tegra/drm.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/tegra/drm.c
b/drivers/gpu/drm/tegra/drm.c
index a0c18ae79029102d0d8a0ba7a56d876a9c003790..219f314cc162c0bee55ee797ee96aa21fdb6656f 100644
(file)
--- 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;
}