summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared-core/mach64_dma.c4
-rw-r--r--shared-core/r128_state.c8
-rw-r--r--shared-core/radeon_mem.c4
-rw-r--r--shared/mach64_dma.c4
-rw-r--r--shared/r128_state.c8
-rw-r--r--shared/radeon_mem.c4
6 files changed, 16 insertions, 16 deletions
diff --git a/shared-core/mach64_dma.c b/shared-core/mach64_dma.c
index 1bbffc35..60663422 100644
--- a/shared-core/mach64_dma.c
+++ b/shared-core/mach64_dma.c
@@ -680,7 +680,7 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
DRM_ERROR( "can not find ring map!\n" );
dev->dev_private = (void *)dev_priv;
mach64_do_cleanup_dma(dev);
- return -EINVAL;
+ return DRM_ERR(EINVAL);
}
DRM_IOREMAP( dev_priv->ring_map, dev );
if ( !dev_priv->ring_map->handle ) {
@@ -688,7 +688,7 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
" descriptor ring\n" );
dev->dev_private = (void *) dev_priv;
mach64_do_cleanup_dma( dev );
- return -ENOMEM;
+ return DRM_ERR(ENOMEM);
}
DRM_FIND_MAP( dev_priv->buffers, init->buffers_offset );
if ( !dev_priv->buffers ) {
diff --git a/shared-core/r128_state.c b/shared-core/r128_state.c
index 81d22099..6ec11b02 100644
--- a/shared-core/r128_state.c
+++ b/shared-core/r128_state.c
@@ -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;
diff --git a/shared-core/radeon_mem.c b/shared-core/radeon_mem.c
index 3a3bf011..83e2f6c0 100644
--- a/shared-core/radeon_mem.c
+++ b/shared-core/radeon_mem.c
@@ -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;
diff --git a/shared/mach64_dma.c b/shared/mach64_dma.c
index 1bbffc35..60663422 100644
--- a/shared/mach64_dma.c
+++ b/shared/mach64_dma.c
@@ -680,7 +680,7 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
DRM_ERROR( "can not find ring map!\n" );
dev->dev_private = (void *)dev_priv;
mach64_do_cleanup_dma(dev);
- return -EINVAL;
+ return DRM_ERR(EINVAL);
}
DRM_IOREMAP( dev_priv->ring_map, dev );
if ( !dev_priv->ring_map->handle ) {
@@ -688,7 +688,7 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init )
" descriptor ring\n" );
dev->dev_private = (void *) dev_priv;
mach64_do_cleanup_dma( dev );
- return -ENOMEM;
+ return DRM_ERR(ENOMEM);
}
DRM_FIND_MAP( dev_priv->buffers, init->buffers_offset );
if ( !dev_priv->buffers ) {
diff --git a/shared/r128_state.c b/shared/r128_state.c
index 81d22099..6ec11b02 100644
--- a/shared/r128_state.c
+++ b/shared/r128_state.c
@@ -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;
diff --git a/shared/radeon_mem.c b/shared/radeon_mem.c
index 3a3bf011..83e2f6c0 100644
--- a/shared/radeon_mem.c
+++ b/shared/radeon_mem.c
@@ -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;