summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMamta Shukla <mamtashukla555@gmail.com>2018-10-18 23:48:15 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2018-10-23 16:59:24 +0300
commitc97ea6a61b5eb1200f4d5ccbf6601bb9f5bc7d3f (patch)
tree01bf85da1f66cdef70d4cdb44ca3256152ece38d /drivers
parent068f304781804e208f901d8f6083189e0e28c420 (diff)
downloadlinux-c97ea6a61b5eb1200f4d5ccbf6601bb9f5bc7d3f.tar.xz
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 <mamtashukla555@gmail.com> Reviewed-by: Sean Paul <sean@poorly.run> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20181018204815.GA23390@armorer
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/msm/adreno/a5xx_gpu.c5
1 files changed, 1 insertions, 4 deletions
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,