summaryrefslogtreecommitdiff
path: root/shared-core/via_dma.c
diff options
context:
space:
mode:
authorErdi Chen <erdi@freedesktop.org>2004-08-30 04:58:24 +0000
committerErdi Chen <erdi@freedesktop.org>2004-08-30 04:58:24 +0000
commit08de6e5b04c1950a5f396315e59d2476726e26d8 (patch)
treea3667343e5e35fe3fc3614a8a5e932e0ed887c5c /shared-core/via_dma.c
parent0844f3e9f37bacf650fab4953482923e9480aae3 (diff)
Fix copy_from_user return value ignored warning at via_dma.c:168.
Diffstat (limited to 'shared-core/via_dma.c')
-rw-r--r--shared-core/via_dma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shared-core/via_dma.c b/shared-core/via_dma.c
index 0121f794..83c14cf0 100644
--- a/shared-core/via_dma.c
+++ b/shared-core/via_dma.c
@@ -165,7 +165,9 @@ static int via_dispatch_cmdbuffer(drm_device_t *dev,
if (vb == NULL) {
return DRM_ERR(EAGAIN);
}
- DRM_COPY_FROM_USER(vb, cmd->buf, cmd->size);
+ if (DRM_COPY_FROM_USER(vb, cmd->buf, cmd->size)) {
+ return DRM_ERR(EFAULT);
+ }
dev_priv->dma_low += cmd->size;
via_cmdbuf_pause(dev_priv);