drm: copy the right data back to userspace for getreserved contexts ioctl

This fixes the information copied back to userspace by the get reserved
contexts ioctl.

From: Egbert Eich <eich@suse.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
Dave Airlie 2005-08-05 22:02:48 +10:00 committed by Dave Airlie
parent 24d1094227
commit c73681e77b

View File

@ -369,7 +369,7 @@ int drm_resctx( struct inode *inode, struct file *filp,
for ( i = 0 ; i < DRM_RESERVED_CONTEXTS ; i++ ) {
ctx.handle = i;
if ( copy_to_user( &res.contexts[i],
&i, sizeof(i) ) )
&ctx, sizeof(ctx) ) )
return -EFAULT;
}
}