drm: gem_cma: Use ERR_CAST helper
Makes the code a bit more readable. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Родитель
b197296179
Коммит
e7c3634713
|
@ -327,7 +327,7 @@ drm_gem_cma_prime_import_sg_table(struct drm_device *dev, size_t size,
|
||||||
/* Create a CMA GEM buffer. */
|
/* Create a CMA GEM buffer. */
|
||||||
cma_obj = __drm_gem_cma_create(dev, size);
|
cma_obj = __drm_gem_cma_create(dev, size);
|
||||||
if (IS_ERR(cma_obj))
|
if (IS_ERR(cma_obj))
|
||||||
return ERR_PTR(PTR_ERR(cma_obj));
|
return ERR_CAST(cma_obj);
|
||||||
|
|
||||||
cma_obj->paddr = sg_dma_address(sgt->sgl);
|
cma_obj->paddr = sg_dma_address(sgt->sgl);
|
||||||
cma_obj->sgt = sgt;
|
cma_obj->sgt = sgt;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче