patch-2.4.6 linux/drivers/char/drm/context.c
Next file: linux/drivers/char/drm/dma.c
Previous file: linux/drivers/char/drm/agpsupport.c
Back to the patch index
Back to the overall index
- Lines: 15
- Date:
Wed Jun 27 17:10:55 2001
- Orig file:
v2.4.5/linux/drivers/char/drm/context.c
- Orig date:
Tue Aug 29 14:09:15 2000
diff -u --recursive --new-file v2.4.5/linux/drivers/char/drm/context.c linux/drivers/char/drm/context.c
@@ -91,10 +91,13 @@
atomic_dec(&dev->queuelist[i]->use_count);
}
/* Allocate a new queue */
- down(&dev->struct_sem);
queue = drm_alloc(sizeof(*queue), DRM_MEM_QUEUES);
+ if(queue == NULL)
+ return -ENOMEM;
+
memset(queue, 0, sizeof(*queue));
+ down(&dev->struct_sem);
atomic_set(&queue->use_count, 1);
++dev->queue_count;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)