mirror of https://gitee.com/openkylin/linux.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 <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
This commit is contained in:
parent
068f304781
commit
c97ea6a61b
|
@ -1222,10 +1222,7 @@ static int a5xx_crashdumper_init(struct msm_gpu *gpu,
|
||||||
SZ_1M, MSM_BO_UNCACHED, gpu->aspace,
|
SZ_1M, MSM_BO_UNCACHED, gpu->aspace,
|
||||||
&dumper->bo, &dumper->iova);
|
&dumper->bo, &dumper->iova);
|
||||||
|
|
||||||
if (IS_ERR(dumper->ptr))
|
return PTR_ERR_OR_ZERO(dumper->ptr);
|
||||||
return PTR_ERR(dumper->ptr);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void a5xx_crashdumper_free(struct msm_gpu *gpu,
|
static void a5xx_crashdumper_free(struct msm_gpu *gpu,
|
||||||
|
|
Loading…
Reference in New Issue