summaryrefslogtreecommitdiff
path: root/shared-core/radeon_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core/radeon_state.c')
-rw-r--r--shared-core/radeon_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shared-core/radeon_state.c b/shared-core/radeon_state.c
index cdbd7a8e..e67bdc0f 100644
--- a/shared-core/radeon_state.c
+++ b/shared-core/radeon_state.c
@@ -1441,7 +1441,8 @@ static int radeon_cp_dispatch_texture( DRMFILE filp,
}
if ( !buf ) {
DRM_DEBUG("radeon_cp_dispatch_texture: EAGAIN\n");
- DRM_COPY_TO_USER( tex->image, image, sizeof(*image) );
+ if (DRM_COPY_TO_USER( tex->image, image, sizeof(*image) ))
+ return DRM_ERR(EFAULT);
return DRM_ERR(EAGAIN);
}