Commit 0769d39c authored by Scott Thompson's avatar Scott Thompson Committed by Dave Airlie
Browse files

drm: ioremap return value checks

Signed-off-by: Scott Thompson <postfail <at>>
Signed-off-by: default avatarDave Airlie <>
parent 22c806c2
......@@ -177,8 +177,14 @@ static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
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;
case _DRM_SHM:
list = drm_find_matching_map(dev, map);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment