Skip to content

Commit

Permalink
drm/mediatek: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
Browse files Browse the repository at this point in the history
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)).

drivers/gpu/drm/mediatek/mtk_drm_gem.c:223:9-16: WARNING: ERR_CAST can be used with mtk_gem
Generated by: scripts/coccinelle/api/err_cast.cocci

Signed-off-by: Vasyl Gomonovych <[email protected]>
Acked-by: Philipp Zabel <[email protected]>
Signed-off-by: CK Hu <[email protected]>
  • Loading branch information
Carmichael561 authored and ckhu-mediatek committed Apr 25, 2018
1 parent 60cc43f commit 1e10911
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/mediatek/mtk_drm_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ struct drm_gem_object *mtk_gem_prime_import_sg_table(struct drm_device *dev,
mtk_gem = mtk_drm_gem_init(dev, attach->dmabuf->size);

if (IS_ERR(mtk_gem))
return ERR_PTR(PTR_ERR(mtk_gem));
return ERR_CAST(mtk_gem);

expected = sg_dma_address(sg->sgl);
for_each_sg(sg->sgl, s, sg->nents, i) {
Expand Down

0 comments on commit 1e10911

Please sign in to comment.