Skip to content
Commit d6c925ca authored by Vaishali Thakkar's avatar Vaishali Thakkar Committed by Rob Clark
Browse files

drm/msm: Move call to PTR_ERR_OR_ZERO after reassignment



Here, a location is reset to NULL before being passed to PTR_ERR.
So, PTR_ERR should be called before its argument is reassigned
to NULL. Further to simplify things use PTR_ERR_OR_ZERO instead
of PTR_ERR and IS_ERR.

Problem found using Coccinelle.

Signed-off-by: default avatarVaishali Thakkar <vaishali.thakkar@oracle.com>
Reviewed-by: default avatarEric Engestrom <eric.engestrom@imgtec.com>
[fixed fmt string warning (s/%ld/%d/)]
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 30c6bfe8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment