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:
22c806c
)
drm: ioremap return value checks
author
Scott Thompson
<postfail at hushmail.com>
Sat, 25 Aug 2007 08:17:49 +0000
(18:17 +1000)
committer
Dave Airlie
<airlied@linux.ie>
Sat, 25 Aug 2007 08:17:49 +0000
(18:17 +1000)
Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/char/drm/drm_bufs.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/char/drm/drm_bufs.c
b/drivers/char/drm/drm_bufs.c
index 3d1ec8234b8b5fb549b8f39e9fb270b787294066..c115b39b85178cc4d84fd9d9b55f5521ccb6d7c5 100644
(file)
--- a/
drivers/char/drm/drm_bufs.c
+++ b/
drivers/char/drm/drm_bufs.c
@@
-177,8
+177,14
@@
static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
MTRR_TYPE_WRCOMB, 1);
}
}
- if (map->type == _DRM_REGISTERS)
+ if (map->type == _DRM_REGISTERS)
{
map->handle = ioremap(map->offset, map->size);
+ if (!map->handle) {
+ drm_free(map, sizeof(*map), DRM_MEM_MAPS);
+ return -ENOMEM;
+ }
+ }
+
break;
case _DRM_SHM:
list = drm_find_matching_map(dev, map);