Commit b5215ef1 authored by Daniel Vetter's avatar Daniel Vetter Committed by Dave Airlie

drm/sis|via: don't return stack garbage from free_mem ioctl

Fallout from my "kill drm_sman" refactor. Unfortunately gcc seems to
have failed me and not warned about this.

Tested-by: Jakob Bornecrantz <wallbraker@gmail.com> (on via)
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent f0afb5d4
...@@ -172,7 +172,6 @@ static int sis_drm_free(struct drm_device *dev, void *data, struct drm_file *fil ...@@ -172,7 +172,6 @@ static int sis_drm_free(struct drm_device *dev, void *data, struct drm_file *fil
drm_sis_private_t *dev_priv = dev->dev_private; drm_sis_private_t *dev_priv = dev->dev_private;
drm_sis_mem_t *mem = data; drm_sis_mem_t *mem = data;
struct sis_memblock *obj; struct sis_memblock *obj;
int ret;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
obj = idr_find(&dev_priv->object_idr, mem->free); obj = idr_find(&dev_priv->object_idr, mem->free);
...@@ -193,7 +192,7 @@ static int sis_drm_free(struct drm_device *dev, void *data, struct drm_file *fil ...@@ -193,7 +192,7 @@ static int sis_drm_free(struct drm_device *dev, void *data, struct drm_file *fil
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
DRM_DEBUG("free = 0x%lx\n", mem->free); DRM_DEBUG("free = 0x%lx\n", mem->free);
return ret; return 0;
} }
static int sis_fb_alloc(struct drm_device *dev, void *data, static int sis_fb_alloc(struct drm_device *dev, void *data,
......
...@@ -189,7 +189,6 @@ int via_mem_free(struct drm_device *dev, void *data, struct drm_file *file_priv) ...@@ -189,7 +189,6 @@ int via_mem_free(struct drm_device *dev, void *data, struct drm_file *file_priv)
drm_via_private_t *dev_priv = dev->dev_private; drm_via_private_t *dev_priv = dev->dev_private;
drm_via_mem_t *mem = data; drm_via_mem_t *mem = data;
struct via_memblock *obj; struct via_memblock *obj;
int ret;
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
obj = idr_find(&dev_priv->object_idr, mem->index); obj = idr_find(&dev_priv->object_idr, mem->index);
...@@ -206,7 +205,7 @@ int via_mem_free(struct drm_device *dev, void *data, struct drm_file *file_priv) ...@@ -206,7 +205,7 @@ int via_mem_free(struct drm_device *dev, void *data, struct drm_file *file_priv)
DRM_DEBUG("free = 0x%lx\n", mem->index); DRM_DEBUG("free = 0x%lx\n", mem->index);
return ret; return 0;
} }
......
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