Commit de801ff8 authored by Dave Airlie's avatar Dave Airlie Committed by David Airlie

fix missing DRM_ERR()s - Eric Anholt

Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent 4c6b5945
......@@ -916,7 +916,7 @@ static int r128_cce_dispatch_write_span( drm_device_t *dev,
count = depth->n;
if (count > 4096 || count <= 0)
return -EMSGSIZE;
return DRM_ERR(EMSGSIZE);
if ( DRM_COPY_FROM_USER( &x, depth->x, sizeof(x) ) ) {
return DRM_ERR(EFAULT);
......@@ -1012,7 +1012,7 @@ static int r128_cce_dispatch_write_pixels( drm_device_t *dev,
count = depth->n;
if (count > 4096 || count <= 0)
return -EMSGSIZE;
return DRM_ERR(EMSGSIZE);
xbuf_size = count * sizeof(*x);
ybuf_size = count * sizeof(*y);
......@@ -1131,7 +1131,7 @@ static int r128_cce_dispatch_read_span( drm_device_t *dev,
count = depth->n;
if (count > 4096 || count <= 0)
return -EMSGSIZE;
return DRM_ERR(EMSGSIZE);
if ( DRM_COPY_FROM_USER( &x, depth->x, sizeof(x) ) ) {
return DRM_ERR(EFAULT);
......@@ -1176,7 +1176,7 @@ static int r128_cce_dispatch_read_pixels( drm_device_t *dev,
count = depth->n;
if (count > 4096 || count <= 0)
return -EMSGSIZE;
return DRM_ERR(EMSGSIZE);
if ( count > dev_priv->depth_pitch ) {
count = dev_priv->depth_pitch;
......
......@@ -137,12 +137,12 @@ static int init_heap(struct mem_block **heap, int start, int size)
struct mem_block *blocks = DRM_MALLOC(sizeof(*blocks));
if (!blocks)
return -ENOMEM;
return DRM_ERR(ENOMEM);
*heap = DRM_MALLOC(sizeof(**heap));
if (!*heap) {
DRM_FREE( blocks, sizeof(*blocks) );
return -ENOMEM;
return DRM_ERR(ENOMEM);
}
blocks->start = start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment