aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/via_mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/via_mm.c')
-rw-r--r--drivers/char/drm/via_mm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/drm/via_mm.c b/drivers/char/drm/via_mm.c
index 85d56acd9d82..36f2547254f9 100644
--- a/drivers/char/drm/via_mm.c
+++ b/drivers/char/drm/via_mm.c
@@ -136,7 +136,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS)
136 136
137 if (mem.type > VIA_MEM_AGP) { 137 if (mem.type > VIA_MEM_AGP) {
138 DRM_ERROR("Unknown memory type allocation\n"); 138 DRM_ERROR("Unknown memory type allocation\n");
139 return DRM_ERR(EINVAL); 139 return -EINVAL;
140 } 140 }
141 mutex_lock(&dev->struct_mutex); 141 mutex_lock(&dev->struct_mutex);
142 if (0 == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized : 142 if (0 == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized :
@@ -144,7 +144,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS)
144 DRM_ERROR 144 DRM_ERROR
145 ("Attempt to allocate from uninitialized memory manager.\n"); 145 ("Attempt to allocate from uninitialized memory manager.\n");
146 mutex_unlock(&dev->struct_mutex); 146 mutex_unlock(&dev->struct_mutex);
147 return DRM_ERR(EINVAL); 147 return -EINVAL;
148 } 148 }
149 149
150 tmpSize = (mem.size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT; 150 tmpSize = (mem.size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT;
@@ -162,7 +162,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS)
162 mem.size = 0; 162 mem.size = 0;
163 mem.index = 0; 163 mem.index = 0;
164 DRM_DEBUG("Video memory allocation failed\n"); 164 DRM_DEBUG("Video memory allocation failed\n");
165 retval = DRM_ERR(ENOMEM); 165 retval = -ENOMEM;
166 } 166 }
167 DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, sizeof(mem)); 167 DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, sizeof(mem));
168 168