patch-2.4.0-test8 linux/drivers/char/drm/drawable.c

Next file: linux/drivers/char/drm/drmP.h
Previous file: linux/drivers/char/drm/dma.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test7/linux/drivers/char/drm/drawable.c linux/drivers/char/drm/drawable.c
@@ -39,7 +39,8 @@
 
 	draw.handle = 0;	/* NOOP */
 	DRM_DEBUG("%d\n", draw.handle);
-	copy_to_user_ret((drm_draw_t *)arg, &draw, sizeof(draw), -EFAULT);
+	if (copy_to_user((drm_draw_t *)arg, &draw, sizeof(draw)))
+		return -EFAULT;
 	return 0;
 }
 

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