Add missing DRM_ERR()s.
authorEric Anholt <anholt@freebsd.org>
Tue, 11 May 2004 04:23:02 +0000 (04:23 +0000)
committerEric Anholt <anholt@freebsd.org>
Tue, 11 May 2004 04:23:02 +0000 (04:23 +0000)
shared-core/mach64_dma.c
shared-core/r128_state.c
shared-core/radeon_mem.c
shared/mach64_dma.c
shared/r128_state.c
shared/radeon_mem.c

index 1bbffc3..6066342 100644 (file)
@@ -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 ) {
index 81d2209..6ec11b0 100644 (file)
@@ -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;
index 3a3bf01..83e2f6c 100644 (file)
@@ -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;
index 1bbffc3..6066342 100644 (file)
@@ -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 ) {
index 81d2209..6ec11b0 100644 (file)
@@ -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;
index 3a3bf01..83e2f6c 100644 (file)
@@ -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;