Skip to content

Commit 6e8a996

Browse files
gscuirobclark
authored andcommitted
drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()
The msm_gem_get_vaddr() returns an ERR_PTR() on failure, and a null is catastrophic here, so we should use IS_ERR_OR_NULL() to check the return value. Fixes: 6a8bd08 ("drm/msm: add sudo flag to submit ioctl") Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/547712/ Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent bd846ce commit 6e8a996

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/msm/adreno/a5xx_gpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static void a5xx_submit_in_rb(struct msm_gpu *gpu, struct msm_gem_submit *submit
8989
* since we've already mapped it once in
9090
* submit_reloc()
9191
*/
92-
if (WARN_ON(!ptr))
92+
if (WARN_ON(IS_ERR_OR_NULL(ptr)))
9393
return;
9494

9595
for (i = 0; i < dwords; i++) {

0 commit comments

Comments
 (0)