summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/savage/savage_state.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-03-17 18:57:02 +0100
committerDave Airlie <airlied@redhat.com>2012-03-20 08:45:31 +0000
commitf10487658a0e5fd793ee5ba7ad645c060e4afbcd (patch)
tree1679201437b50a964a8445c50a00c6009e756579 /drivers/gpu/drm/savage/savage_state.c
parentf48bb04a56fd1f582a45f3882255477417bc0ed7 (diff)
drivers/gpu/drm/savage/savage_state.c: add missing kfree
Most of the error handling code in this function frees the buffers kcmd_addr, kvb_addr, and kbox_addr allocated at the beginning of this function. These two branches are changed to do the same. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/savage/savage_state.c')
-rw-r--r--drivers/gpu/drm/savage/savage_state.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/savage/savage_state.c b/drivers/gpu/drm/savage/savage_state.c
index 8a3e31599c9..031aaaf79ac 100644
--- a/drivers/gpu/drm/savage/savage_state.c
+++ b/drivers/gpu/drm/savage/savage_state.c
@@ -1057,7 +1057,8 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
DRM_ERROR("indexed drawing command extends "
"beyond end of command buffer\n");
DMA_FLUSH();
- return -EINVAL;
+ ret = -EINVAL;
+ goto done;
}
/* fall through */
case SAVAGE_CMD_DMA_PRIM:
@@ -1076,7 +1077,7 @@ int savage_bci_cmdbuf(struct drm_device *dev, void *data, struct drm_file *file_
cmdbuf->vb_stride,
cmdbuf->nbox, cmdbuf->box_addr);
if (ret != 0)
- return ret;
+ goto done;
first_draw_cmd = NULL;
}
}