Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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> hushmail.com>
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent 22c806c2
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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);