aboutsummaryrefslogtreecommitdiffstats
path: root/amdgpu/amdgpu_bo.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <funfunctor@folklore1984.net>2017-04-19 02:13:19 +1000
committerEdward O'Callaghan <funfunctor@folklore1984.net>2017-04-19 18:08:10 +1000
commit7cfcd5ef4b394f66c4a6fde705cf7c583a0b0c7b (patch)
tree096a811ab573ccd2ef080941c8238464674feb99 /amdgpu/amdgpu_bo.c
parent90c304584af8e1bac6391530f59bbe9ccac8e06a (diff)
downloadexternal_libdrm-7cfcd5ef4b394f66c4a6fde705cf7c583a0b0c7b.tar.gz
external_libdrm-7cfcd5ef4b394f66c4a6fde705cf7c583a0b0c7b.tar.bz2
external_libdrm-7cfcd5ef4b394f66c4a6fde705cf7c583a0b0c7b.zip
amdgpu/: concisely && consistently check null ptrs in canonical form
Be consistent and use the canonical form while sanity checking null pointers, also combine a few branches for brevity. v2: rebase on top of 'add amdgpu_cs_wait_fences' series. Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_bo.c')
-rw-r--r--amdgpu/amdgpu_bo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index 9adfffa2..5ac456be 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -652,7 +652,7 @@ int amdgpu_bo_list_update(amdgpu_bo_list_handle handle,
return -EINVAL;
list = malloc(number_of_resources * sizeof(struct drm_amdgpu_bo_list_entry));
- if (list == NULL)
+ if (!list)
return -ENOMEM;
args.in.operation = AMDGPU_BO_LIST_OP_UPDATE;