patch-2.4.6 linux/drivers/char/drm/dma.c
Next file: linux/drivers/char/drm/ffb_drv.c
Previous file: linux/drivers/char/drm/context.c
Back to the patch index
Back to the overall index
-  Lines: 12
-  Date:
Wed Jun 27 17:10:55 2001
-  Orig file: 
v2.4.5/linux/drivers/char/drm/dma.c
-  Orig date: 
Wed Nov 15 00:41:03 2000
diff -u --recursive --new-file v2.4.5/linux/drivers/char/drm/dma.c linux/drivers/char/drm/dma.c
@@ -38,7 +38,10 @@
 {
 	int i;
 	
-	dev->dma = drm_alloc(sizeof(*dev->dma), DRM_MEM_DRIVER);
+	if (!(dev->dma = drm_alloc(sizeof(*dev->dma), DRM_MEM_DRIVER))) {
+                printk(KERN_ERR "drm_dma_setup: can't drm_alloc dev->dma");
+                return;
+        }       
 	memset(dev->dma, 0, sizeof(*dev->dma));
 	for (i = 0; i <= DRM_MAX_ORDER; i++)
 		memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0]));
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)