提交 e7c36347 编写于 作者: S Sachin Kamat 提交者: Dave Airlie

drm: gem_cma: Use ERR_CAST helper

Makes the code a bit more readable.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NSachin Kamat <sachin.kamat@samsung.com>
Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 b1972961
......@@ -327,7 +327,7 @@ drm_gem_cma_prime_import_sg_table(struct drm_device *dev, size_t size,
/* Create a CMA GEM buffer. */
cma_obj = __drm_gem_cma_create(dev, size);
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->sgt = sgt;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册