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 <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Reviewed-by: Akhil P Oommen <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/547712/ Signed-off-by: Rob Clark <[email protected]>
1 parent bd846ce commit 6e8a996

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)