From 485b259b4492ed6b7abdf063d1d5cefe01d3a3b0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 11 May 2004 04:23:02 +0000 Subject: Add missing DRM_ERR()s. --- shared/mach64_dma.c | 4 ++-- shared/r128_state.c | 8 ++++---- shared/radeon_mem.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'shared') 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; -- cgit v1.2.3