aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_bufs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-25 23:21:43 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-25 23:21:43 -0400
commit82b6c3af0482c167fb3bb51375589e6d9c5c67a4 (patch)
tree4ee4ed76faadb309b499187ea7ae797db69abfd3 /drivers/char/drm/drm_bufs.c
parent9f4c7ac227423eb4a514ce0bbd3a884a26541e63 (diff)
parent85abb3f95010b277a6efbc9b8031a7854af87e10 (diff)
Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6: drm: ioremap balanced with iounmap for drivers/char/drm drm: fix error returns, sysfs error handling fix return code in error case. drm: mga: set dev_priv_size drm: savage: dev->agp_buffer_map is not initialized for AGP DMA on savages drm: radeon: only allow specific type-3 packetss through verifier
Diffstat (limited to 'drivers/char/drm/drm_bufs.c')
-rw-r--r--drivers/char/drm/drm_bufs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c
index 029baea33b62..6eafff13dab6 100644
--- a/drivers/char/drm/drm_bufs.c
+++ b/drivers/char/drm/drm_bufs.c
@@ -237,6 +237,8 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset,
237 237
238 list = drm_alloc(sizeof(*list), DRM_MEM_MAPS); 238 list = drm_alloc(sizeof(*list), DRM_MEM_MAPS);
239 if (!list) { 239 if (!list) {
240 if (map->type == _DRM_REGISTERS)
241 drm_ioremapfree(map->handle, map->size, dev);
240 drm_free(map, sizeof(*map), DRM_MEM_MAPS); 242 drm_free(map, sizeof(*map), DRM_MEM_MAPS);
241 return -EINVAL; 243 return -EINVAL;
242 } 244 }
@@ -252,6 +254,8 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset,
252 map->offset; 254 map->offset;
253 ret = drm_map_handle(dev, &list->hash, user_token, 0); 255 ret = drm_map_handle(dev, &list->hash, user_token, 0);
254 if (ret) { 256 if (ret) {
257 if (map->type == _DRM_REGISTERS)
258 drm_ioremapfree(map->handle, map->size, dev);
255 drm_free(map, sizeof(*map), DRM_MEM_MAPS); 259 drm_free(map, sizeof(*map), DRM_MEM_MAPS);
256 drm_free(list, sizeof(*list), DRM_MEM_MAPS); 260 drm_free(list, sizeof(*list), DRM_MEM_MAPS);
257 mutex_unlock(&dev->struct_mutex); 261 mutex_unlock(&dev->struct_mutex);