patch-2.4.5 linux/drivers/char/drm/fops.c

Next file: linux/drivers/char/epca.c
Previous file: linux/drivers/char/drm/ffb_drv.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.4/linux/drivers/char/drm/fops.c linux/drivers/char/drm/fops.c
@@ -47,7 +47,10 @@
 	DRM_DEBUG("pid = %d, minor = %d\n", current->pid, minor);
 
 	priv		    = drm_alloc(sizeof(*priv), DRM_MEM_FILES);
+	if(priv == NULL)
+		return -ENOMEM;
 	memset(priv, 0, sizeof(*priv));
+
 	filp->private_data  = priv;
 	priv->uid	    = current->euid;
 	priv->pid	    = current->pid;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)