From: Mamta Shukla Date: Thu, 18 Oct 2018 20:48:15 +0000 (+0530) Subject: drm: msm: adreno: Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) +PTR_ERR X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c97ea6a61b5eb1200f4d5ccbf6601bb9f5bc7d3f;p=openwrt%2Fstaging%2Fblogic.git drm: msm: adreno: Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) +PTR_ERR Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR because its better to have inlined function rather than code-opened implementation. Signed-off-by: Mamta Shukla Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20181018204815.GA23390@armorer --- diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c index ab1d9308c311..29b3d9d7d54b 100644 --- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c @@ -1222,10 +1222,7 @@ static int a5xx_crashdumper_init(struct msm_gpu *gpu, SZ_1M, MSM_BO_UNCACHED, gpu->aspace, &dumper->bo, &dumper->iova); - if (IS_ERR(dumper->ptr)) - return PTR_ERR(dumper->ptr); - - return 0; + return PTR_ERR_OR_ZERO(dumper->ptr); } static void a5xx_crashdumper_free(struct msm_gpu *gpu,