diff options
author | Prathyush K <prathyush.k@samsung.com> | 2012-11-07 15:58:58 +0530 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-12-04 14:46:00 +0900 |
commit | 1119707e225c1627ed3f413a569e297883946fb2 (patch) | |
tree | be062d0f73708cb88d47cc6be2359dfce9d5723c | |
parent | 4ddc404bc0b3750b015b021653a88943591f40f6 (diff) |
drm/exynos: remove unnecessary sg_alloc_table call
The function dma_get_sgtable will allocate a sg table internally so
it is not necessary to allocate a sg table before it. The unnecessary
'sg_alloc_table' call is removed.
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c index b98da307fae..d9307bd2973 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c @@ -40,21 +40,15 @@ static struct sg_table *exynos_get_sgt(struct drm_device *drm_dev, if (!sgt) goto out; - ret = sg_alloc_table(sgt, buf->sgt->nents, GFP_KERNEL); - if (ret) - goto err_free_sgt; - ret = dma_get_sgtable(drm_dev->dev, sgt, buf->kvaddr, buf->dma_addr, buf->size); if (ret < 0) { DRM_ERROR("failed to get sgtable.\n"); - goto err_free_table; + goto err_free_sgt; } return sgt; -err_free_table: - sg_free_table(sgt); err_free_sgt: kfree(sgt); sgt = NULL; |