diff options
author | Prathyush K <prathyush.k@samsung.com> | 2012-11-07 05:28:58 -0500 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-12-04 00:46:00 -0500 |
commit | 1119707e225c1627ed3f413a569e297883946fb2 (patch) | |
tree | be062d0f73708cb88d47cc6be2359dfce9d5723c /drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | |
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>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_dmabuf.c')
-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 b98da307faec..d9307bd29738 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, | |||
40 | if (!sgt) | 40 | if (!sgt) |
41 | goto out; | 41 | goto out; |
42 | 42 | ||
43 | ret = sg_alloc_table(sgt, buf->sgt->nents, GFP_KERNEL); | ||
44 | if (ret) | ||
45 | goto err_free_sgt; | ||
46 | |||
47 | ret = dma_get_sgtable(drm_dev->dev, sgt, buf->kvaddr, | 43 | ret = dma_get_sgtable(drm_dev->dev, sgt, buf->kvaddr, |
48 | buf->dma_addr, buf->size); | 44 | buf->dma_addr, buf->size); |
49 | if (ret < 0) { | 45 | if (ret < 0) { |
50 | DRM_ERROR("failed to get sgtable.\n"); | 46 | DRM_ERROR("failed to get sgtable.\n"); |
51 | goto err_free_table; | 47 | goto err_free_sgt; |
52 | } | 48 | } |
53 | 49 | ||
54 | return sgt; | 50 | return sgt; |
55 | 51 | ||
56 | err_free_table: | ||
57 | sg_free_table(sgt); | ||
58 | err_free_sgt: | 52 | err_free_sgt: |
59 | kfree(sgt); | 53 | kfree(sgt); |
60 | sgt = NULL; | 54 | sgt = NULL; |