Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Remove unnecessary NULL check

container_of cannot return NULL, so it is unnecessary to check for
NULL after gem_to_amdgpu_bo, which is just a container_of call

Signed-off-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Kent Russell and committed by
Alex Deucher
6c9c9738 24a1b667

+2 -4
+2 -4
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
··· 87 87 { 88 88 struct amdgpu_bo *aobj = gem_to_amdgpu_bo(gobj); 89 89 90 - if (aobj) { 91 - amdgpu_hmm_unregister(aobj); 92 - ttm_bo_put(&aobj->tbo); 93 - } 90 + amdgpu_hmm_unregister(aobj); 91 + ttm_bo_put(&aobj->tbo); 94 92 } 95 93 96 94 int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,