Message ID | 02507a9b-87e2-45a6-9410-d4dfb0e4b1a2@web.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/mediatek: Adjustments for mtk_gem_prime_vmap() | expand |
diff --git a/drivers/gpu/drm/mediatek/mtk_gem.c b/drivers/gpu/drm/mediatek/mtk_gem.c index a172456d1d7b..9c7b7d0a3ffc 100644 --- a/drivers/gpu/drm/mediatek/mtk_gem.c +++ b/drivers/gpu/drm/mediatek/mtk_gem.c @@ -259,13 +259,13 @@ int mtk_gem_prime_vmap(struct drm_gem_object *obj, struct iosys_map *map) mtk_gem->kvaddr = vmap(mtk_gem->pages, npages, VM_MAP, pgprot_writecombine(PAGE_KERNEL)); + sg_free_table(sgt); if (!mtk_gem->kvaddr) { - sg_free_table(sgt); kfree(sgt); kfree(mtk_gem->pages); return -ENOMEM; } - sg_free_table(sgt); + kfree(sgt); out: